micro-test-plus 6.0.0
µTest++ Testing Framework
Loading...
Searching...
No Matches
micro_os_plus::micro_test_plus::literals Namespace Reference

Deprecated user-defined literals of the test checks. More...

Functions

constexpr auto operator""_b (const char *name, decltype(sizeof("")) size)
 Deprecated user-defined literal operator to create a named boolean constant.
template<char... Cs>
constexpr auto operator""_c ()
 Deprecated user-defined literal operator to convert to char.
template<char... Cs>
constexpr auto operator""_d ()
 Deprecated user-defined literal operator to convert to double.
template<char... Cs>
constexpr auto operator""_f ()
 Deprecated user-defined literal operator to convert to float.
template<char... Cs>
constexpr auto operator""_i ()
 Deprecated user-defined literal operator to convert to int.
template<char... Cs>
constexpr auto operator""_i16 ()
 Deprecated user-defined literal operator to convert to int16_t.
template<char... Cs>
constexpr auto operator""_i32 ()
 Deprecated user-defined literal operator to convert to int32_t.
template<char... Cs>
constexpr auto operator""_i64 ()
 Deprecated user-defined literal operator to convert to int64_t.
template<char... Cs>
constexpr auto operator""_i8 ()
 Deprecated user-defined literal operator to convert to int8_t.
template<char... Cs>
constexpr auto operator""_l ()
 Deprecated user-defined literal operator to convert to long.
template<char... Cs>
constexpr auto operator""_ld ()
 Deprecated user-defined literal operator to convert to long double.
template<char... Cs>
constexpr auto operator""_ll ()
 Deprecated user-defined literal operator to convert to long long.
template<char... Cs>
constexpr auto operator""_s ()
 Deprecated user-defined literal operator to convert to short.
template<char... Cs>
constexpr auto operator""_sc ()
 Deprecated user-defined literal operator to convert to signed char.
template<char... Cs>
constexpr auto operator""_u ()
 Deprecated user-defined literal operator to convert to unsigned.
template<char... Cs>
constexpr auto operator""_u16 ()
 Deprecated user-defined literal operator to convert to uint16_t.
template<char... Cs>
constexpr auto operator""_u32 ()
 Deprecated user-defined literal operator to convert to uint32_t.
template<char... Cs>
constexpr auto operator""_u64 ()
 Deprecated user-defined literal operator to convert to uint64_t.
template<char... Cs>
constexpr auto operator""_u8 ()
 Deprecated user-defined literal operator to convert to uint8_t.
template<char... Cs>
constexpr auto operator""_uc ()
 Deprecated user-defined literal operator to convert to unsigned char.
template<char... Cs>
constexpr auto operator""_ul ()
 Deprecated user-defined literal operator to convert to unsigned long.
template<char... Cs>
constexpr auto operator""_ull ()
 Deprecated user-defined literal operator to convert to unsigned long long.
template<char... Cs>
constexpr auto operator""_us ()
 Deprecated user-defined literal operator to convert to unsigned short.

Detailed Description

The literals namespace provides the deprecated user-defined literal operators, which set the type of the operands of the µTest++ comparators and operators.

These operators allow constants to be suffixed (for example, 1_i, 2_u16) to produce strongly-typed values, which the comparator functions and the operators display in the test reports.

The complementary wrappers for converting dynamic values and expressions to recognised types (such as to_i, to_u8) are defined in the parent micro_os_plus::micro_test_plus namespace.

Deprecated
Pass the plain values to the function comparators eq(), ne(), gt(), ge(), lt(), and le(), and use approx() for the floating-point values compared with a tolerance (since 6.0.0). The function comparators report the operands in the same way, and do not need the literal suffixes.
Since
3.2.0