|
micro-test-plus 6.0.0
µTest++ Testing Framework
|
Deprecated v5.0.1 names of the logical functions. More...
Deprecated Functions | |
| template<class Expr_T> | |
| constexpr auto | micro_os_plus::micro_test_plus::_not (Expr_T &&expr) |
| Deprecated generic logical not operation, the v5.0.1 name of negate(). | |
| template<class Lhs_T, class Rhs_T> | |
| constexpr auto | micro_os_plus::micro_test_plus::_and (Lhs_T &&lhs, Rhs_T &&rhs) |
| Deprecated generic logical and operation, the v5.0.1 name of all_of(). | |
| template<class Lhs_T, class Rhs_T> | |
| constexpr auto | micro_os_plus::micro_test_plus::_or (Lhs_T &&lhs, Rhs_T &&rhs) |
| Deprecated generic logical (inclusive) or operation, the v5.0.1 name of any_of(). | |
| template<class T> | |
| constexpr auto | micro_os_plus::micro_test_plus::mut (const T &t) noexcept -> T & |
| Deprecated generic mutator to remove const qualification from a reference. | |
| template<class T> requires std::is_floating_point_v<T> | |
| constexpr auto | micro_os_plus::micro_test_plus::approx (T value, std::type_identity_t< T > epsilon) noexcept -> detail::value< T > |
| Deprecated wrapping of a floating-point value with an explicit comparison tolerance. | |
The functions mt::_and(), mt::_or(), and mt::_not() are the v5.0.1 names of mt::all_of(), mt::any_of(), and mt::negate(), and behave as them. They are deprecated since 6.0.0, because no other current public name starts with an underscore.
| Deprecated | Replacement |
|---|---|
| mt::_and() | mt::all_of() |
| mt::_or() | mt::any_of() |
| mt::_not() | mt::negate() |
Unlike the replacements, mt::_and() and mt::_or() take exactly two operands, whereas mt::all_of() and mt::any_of() take two or more.
The overloaded logical operators of the mt::operators namespace are also deprecated since 6.0.0, in favour of the same functions.
|
nodiscardconstexpr |
The same as all_of(). The name was changed since a leading underscore is not used by the other current public names.
| Lhs_T | Type of the left hand side operand. |
| Rhs_T | Type of the right hand side operand. |
| lhs | Left hand side operand. |
| rhs | Right hand side operand. |
Forwards to all_of(), so the returned expression is the same, and is reported in the same way.
Definition at line 698 of file deprecated-inlines.h.
References _and(), and all_of().
Referenced by _and().
|
nodiscardconstexpr |
The same as negate(). The name was changed since a leading underscore is not used by the other current public names.
| Expr_T | Type of the operand. |
| expr | Logical expression to be negated. |
Forwards to negate(), so the returned expression is the same, and is reported in the same way.
Definition at line 685 of file deprecated-inlines.h.
References _not(), and negate().
Referenced by _not().
|
nodiscardconstexpr |
The same as any_of(). The name was changed since a leading underscore is not used by the other current public names.
| Lhs_T | Type of the left hand side operand. |
| Rhs_T | Type of the right hand side operand. |
| lhs | Left hand side operand. |
| rhs | Right hand side operand. |
Forwards to any_of(), so the returned expression is the same, and is reported in the same way.
Definition at line 711 of file deprecated-inlines.h.
References _or(), and any_of().
Referenced by _or().
|
nodiscardconstexprnoexcept |
The floating-point literals (1.5_d) and wrappers (to_d{ 1.5 }) compare with a tolerance derived from the number of decimals written (0.1 for 1.5). approx() makes the tolerance explicit, independent of how the value is written. All six comparisons apply it: values whose difference is less than the tolerance are equal, and neither less nor greater. If both operands have a tolerance, the smaller one is used.
For a single comparison, also of integers, the approx (lhs, rhs, epsilon) function comparator may be used instead.
| T | The floating-point type of the value. |
| value | The expected value. |
| epsilon | The tolerance, converted to T. |
Constructs the floating-point detail::value<T> with the given tolerance, instead of the one derived from the number of decimals of the value.
Definition at line 1277 of file deprecated-inlines.h.
References approx().
|
nodiscardconstexprnoexcept |
Not used by the framework. Equivalent to const_cast<T&> (t), which replaces it.
| T | The type of the input object. |
| t | The object from which to remove const qualification. |
Removes the const qualifier from the reference with const_cast.
Definition at line 725 of file deprecated-inlines.h.
References mut().
Referenced by mut().