|
micro-test-plus 6.0.1
µTest++ Testing Framework
|
Deprecated comparison and logical operators of the test checks. More...
Functions | |
| template<class Lhs_T, class Rhs_T> requires extension::any_op<std::remove_cvref_t<Lhs_T>, std::remove_cvref_t<Rhs_T>> | |
| constexpr auto | operator and (Lhs_T &&lhs, Rhs_T &&rhs) |
| Deprecated logical && (and) operator. | |
| template<class T> requires extension::is_op<std::remove_cvref_t<T>> | |
| constexpr auto | operator not (T &&t) |
| Deprecated logical ! (not) operator. | |
| template<class Lhs_T, class Rhs_T> requires extension::any_op<std::remove_cvref_t<Lhs_T>, std::remove_cvref_t<Rhs_T>> | |
| constexpr auto | operator or (Lhs_T &&lhs, Rhs_T &&rhs) |
| Deprecated logical || (or) operator. | |
| template<class Lhs_T, class Rhs_T> requires extension::any_op<std::remove_cvref_t<Lhs_T>, std::remove_cvref_t<Rhs_T>> | |
| constexpr auto | operator!= (Lhs_T &&lhs, Rhs_T &&rhs) |
| Deprecated non-equality operator. | |
| template<class Lhs_T, class Rhs_T> requires extension::any_op<std::remove_cvref_t<Lhs_T>, std::remove_cvref_t<Rhs_T>> | |
| constexpr auto | operator< (Lhs_T &&lhs, Rhs_T &&rhs) |
| Deprecated less than operator. | |
| template<class Lhs_T, class Rhs_T> requires extension::any_op<std::remove_cvref_t<Lhs_T>, std::remove_cvref_t<Rhs_T>> | |
| constexpr auto | operator<= (Lhs_T &&lhs, Rhs_T &&rhs) |
| Deprecated less than or equal operator. | |
| template<class Lhs_T, class Rhs_T> requires extension::any_op<std::remove_cvref_t<Lhs_T>, std::remove_cvref_t<Rhs_T>> | |
| constexpr auto | operator== (Lhs_T &&lhs, Rhs_T &&rhs) |
| Deprecated equality operator. | |
| template<class Lhs_T, class Rhs_T> requires extension::any_op<std::remove_cvref_t<Lhs_T>, std::remove_cvref_t<Rhs_T>> | |
| constexpr auto | operator> (Lhs_T &&lhs, Rhs_T &&rhs) |
| Deprecated greater than operator. | |
| template<class Lhs_T, class Rhs_T> requires extension::any_op<std::remove_cvref_t<Lhs_T>, std::remove_cvref_t<Rhs_T>> | |
| constexpr auto | operator>= (Lhs_T &&lhs, Rhs_T &&rhs) |
| Deprecated greater than or equal operator. | |
The micro_os_plus::micro_test_plus::operators namespace provides the deprecated overloaded operators of the test checks.
This namespace includes the equality, inequality, relational, and logical operators of the framework expression types, which apply to the strongly-typed constants (the user-defined literals) and to the dynamic values (the wrappers).
To minimise conflicts with application-defined operators, these overloads are enabled only when an operand is a framework expression type (see extension::is_op). Constants typically require a literal suffix (e.g., 1_i), while dynamic values should be wrapped using the provided casting utilities (e.g., mt::to_i{...}). When neither operand is of such a type, the standard operators are selected; they return a plain bool, so a failed check cannot show the operands.
The operands are forwarded, as by the function comparators: the temporaries are moved into the returned expression, and the named operands are copied, unless they cannot be copied, when they are referred to.
There are no operators for strings and containers: the standard operators would be selected for std::string objects and for containers of the same type, and the framework operators for std::string_view objects would also replace the standard ones in the application code that follows the using directive. Use mt::eq() and mt::ne() to compare strings and containers.