The operators
Namespace Reference
Custom operator overloads for expressive and type-safe test assertions. More...
Definition
namespace micro_os_plus::micro_test_plus::operators { ... }
Operators Index
template < ... > | |
constexpr auto | operator and (const Lhs_T &lhs, const Rhs_T &rhs) |
Logical | |
template < ... > | |
constexpr auto | operator not (const T &t) |
Logical | |
template < ... > | |
constexpr auto | operator or (const Lhs_T &lhs, const Rhs_T &rhs) |
Logical | |
template < ... > | |
constexpr auto | operator!= (const Lhs_T &lhs, const Rhs_T &rhs) |
Non-equality operator for custom types. Matches only if at least one operand is of local type. More... | |
constexpr auto | operator!= (std::string_view lhs, std::string_view rhs) |
Non-equality operator for | |
template < ... > | |
constexpr auto | operator!= (T &&lhs, T &&rhs) |
Non-equality operator for containers. More... | |
template < ... > | |
constexpr auto | operator< (const Lhs_T &lhs, const Rhs_T &rhs) |
Less than operator. Matches only if at least one operand is of local type (derived from local | |
template < ... > | |
constexpr auto | operator<= (const Lhs_T &lhs, const Rhs_T &rhs) |
Less than or equal operator. Matches only if at least one operand is of local type (derived from local | |
template < ... > | |
constexpr auto | operator== (const Lhs_T &lhs, const Rhs_T &rhs) |
Equality operator for custom types. Matches only if at least one operand is of local type. More... | |
constexpr auto | operator== (std::string_view lhs, std::string_view rhs) |
Equality operator for | |
template < ... > | |
constexpr auto | operator== (T &&lhs, T &&rhs) |
Equality operator for containers. More... | |
template < ... > | |
constexpr auto | operator> (const Lhs_T &lhs, const Rhs_T &rhs) |
Greater than operator. Matches only if at least one operand is of local type (derived from local | |
template < ... > | |
constexpr auto | operator>= (const Lhs_T &lhs, const Rhs_T &rhs) |
Greater than or equal operator. Matches only if at least one operand is of local type (derived from local | |
Description
Custom operator overloads for expressive and type-safe test assertions.
The micro_os_plus::micro_test_plus::operators
namespace provides a comprehensive set of custom operator overloads designed to enable expressive, concise, and type-safe test assertions within the µTest++ framework.
This namespace includes equality, inequality, relational, and logical operators tailored for use with the framework’s custom types, containers, and string views. These operators facilitate the creation of clear and readable test expressions, supporting both strongly-typed constants (via user-defined literals) and dynamic values (via wrappers).
Please be aware that these operators may conflict with other operators defined within the application under test.
To minimise conflicts with application-defined operators, these overloads are enabled only for specific types recognised by the framework, such as those derived from the local op
base type or identified as containers or string views. 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{...}
).
All definitions within this namespace are implemented in the include/micro-os-plus/micro-test-plus
folder, ensuring a modular and maintainable codebase.
Generated via docusaurus-plugin-doxygen by Doxygen 1.14.0.