|
micro-test-plus 6.0.1
µTest++ Testing Framework
|
C++ header file with inline implementations for the µTest++ function comparators. More...
Go to the source code of this file.
Namespaces | |
| namespace | micro_os_plus |
| The primary namespace for the µOS++ framework. | |
| namespace | micro_os_plus::micro_test_plus |
| Primary namespace for the µTest++ testing framework. | |
Functions | |
| template<class First_T, class Second_T, class... Rest_T> requires (extension::checkable<std::remove_cvref_t<First_T>> and extension::checkable<std::remove_cvref_t<Second_T>> and (extension::checkable<std::remove_cvref_t<Rest_T>> and ...)) | |
| constexpr auto | micro_os_plus::micro_test_plus::all_of (First_T &&first, Second_T &&second, Rest_T &&... rest) |
| Generic logical and operation, for two or more operands. | |
| template<class First_T, class Second_T, class... Rest_T> requires (extension::checkable<std::remove_cvref_t<First_T>> and extension::checkable<std::remove_cvref_t<Second_T>> and (extension::checkable<std::remove_cvref_t<Rest_T>> and ...)) | |
| constexpr auto | micro_os_plus::micro_test_plus::any_of (First_T &&first, Second_T &&second, Rest_T &&... rest) |
| Generic logical (inclusive) or operation, for two or more operands. | |
| template<class Lhs_T, class Rhs_T, class Epsilon_T> requires (extension::approx_operand<Lhs_T> and extension::approx_operand<Rhs_T> and extension::approx_operand<Epsilon_T>) | |
| constexpr auto | micro_os_plus::micro_test_plus::approx (Lhs_T &&lhs, Rhs_T &&rhs, Epsilon_T &&epsilon) |
| Approximate equality comparator, with an explicit tolerance. | |
| template<class Lhs_T, class Rhs_T> requires detail::comparable_operands<detail::comparison::equal, Lhs_T, Rhs_T> | |
| constexpr auto | micro_os_plus::micro_test_plus::eq (Lhs_T &&lhs, Rhs_T &&rhs) |
| Generic equality comparator. | |
| template<class Lhs_T, class Rhs_T> requires detail::comparable_operands<detail::comparison::greater_equal, Lhs_T, Rhs_T> | |
| constexpr auto | micro_os_plus::micro_test_plus::ge (Lhs_T &&lhs, Rhs_T &&rhs) |
| Generic greater than or equal comparator. | |
| template<class Lhs_T, class Rhs_T> requires detail::comparable_operands<detail::comparison::greater, Lhs_T, Rhs_T> | |
| constexpr auto | micro_os_plus::micro_test_plus::gt (Lhs_T &&lhs, Rhs_T &&rhs) |
| Generic greater than comparator. | |
| template<class Lhs_T, class Rhs_T> requires detail::comparable_operands<detail::comparison::less_equal, Lhs_T, Rhs_T> | |
| constexpr auto | micro_os_plus::micro_test_plus::le (Lhs_T &&lhs, Rhs_T &&rhs) |
| Generic less than or equal comparator. | |
| template<class Lhs_T, class Rhs_T> requires detail::comparable_operands<detail::comparison::less, Lhs_T, Rhs_T> | |
| constexpr auto | micro_os_plus::micro_test_plus::lt (Lhs_T &&lhs, Rhs_T &&rhs) |
| Generic less than comparator. | |
| template<class Lhs_T, class Rhs_T> requires detail::comparable_operands<detail::comparison::not_equal, Lhs_T, Rhs_T> | |
| constexpr auto | micro_os_plus::micro_test_plus::ne (Lhs_T &&lhs, Rhs_T &&rhs) |
| Generic non-equality comparator. | |
| template<class Expr_T> requires extension::checkable<std::remove_cvref_t<Expr_T>> | |
| constexpr auto | micro_os_plus::micro_test_plus::negate (Expr_T &&expr) |
| Generic logical not operation. | |
This header provides the inline implementations for the function comparator templates used within the µTest++ framework. It defines the logic for generic comparison functions, including equality, non-equality, greater than, less than, greater than or equal, less than or equal, and the approximate comparison. Additionally, it implements logical combinators such as conjunction (all_of), disjunction (any_of), and negation (negate).
The C strings are compared by content, the other pointers by address. The logical combinators have descriptive names, since and, or, and not are alternative tokens and cannot be used as identifiers.
All definitions reside within the micro_os_plus::micro_test_plus namespace.
This file is included by function-comparators.h; the applications include micro-os-plus/micro-test-plus.h, not this file.
Definition in file function-comparators-inlines.h.