![]() |
micro-test-plus 3.2.2
µTest++ Testing Framework
|
Overloaded operators for container comparison. More...
Functions | |
template<class T, type_traits::requires_t< type_traits::is_container_v< T > > = 0> | |
constexpr auto | micro_os_plus::micro_test_plus::operators::operator!= (T &&lhs, T &&rhs) |
Non-equality operator for containers. | |
template<class T, type_traits::requires_t< type_traits::is_container_v< T > > = 0> | |
constexpr auto | micro_os_plus::micro_test_plus::operators::operator== (T &&lhs, T &&rhs) |
Equality operator for containers. |
The µTest++ framework provides overloaded operators to facilitate direct and expressive comparison of standard containers, such as vectors and strings, within test cases. These operators enable developers to write clear and concise assertions when verifying the equality or inequality of container contents.
In addition to the generic operators, specialised equality and inequality operators are provided for containers, ensuring accurate and efficient comparison semantics that align with modern C++ practices.
|
nodiscardconstexpr |
T | The container type, constrained to recognised container types. |
[in] | lhs | The left hand side container operand. |
[in] | rhs | The right hand side container operand. |
This overload of the non-equality operator enables direct comparison of two container objects within the µTest++ framework. It constructs a comparator object that can be used in test expectations and assertions to verify that two containers are not equal in content or order.
The operator is enabled only for types recognised as containers by the framework's type traits.
Definition at line 205 of file operators.h.
|
nodiscardconstexpr |
T | The container type, constrained to recognised container types. |
[in] | lhs | The left hand side container operand. |
[in] | rhs | The right hand side container operand. |
This overload of the equality operator enables direct comparison of two container objects within the µTest++ framework. It constructs a comparator object that can be used in test expectations and assertions to verify that two containers are equal in content and order.
The operator is enabled only for types recognised as containers by the framework's type traits.
Definition at line 177 of file operators.h.