|
micro-test-plus 4.1.0
µTest++ Testing Framework
|
Overloaded operators for container comparison. More...
Functions | |
| template<class Lhs_T, class Rhs_T> requires (type_traits::container_like<Lhs_T> and type_traits::container_like<Rhs_T>) | |
| constexpr auto | micro_os_plus::micro_test_plus::operators::operator!= (const Lhs_T &lhs, const Rhs_T &rhs) |
| Non-equality operator for containers. | |
| template<class Lhs_T, class Rhs_T> requires (type_traits::container_like<Lhs_T> and type_traits::container_like<Rhs_T>) | |
| constexpr auto | micro_os_plus::micro_test_plus::operators::operator== (const Lhs_T &lhs, const Rhs_T &rhs) |
| Equality operator for containers. | |
Within test cases, overloaded operators support direct and expressive comparison of standard containers, such as vectors and strings. These operators enable clear, concise assertions when verifying equality or inequality of container contents.
In addition to generic operators, specialised equality and inequality operators are available for container types where dedicated handling improves correctness or efficiency, while preserving modern C++ semantics.
|
nodiscardconstexpr |
Constructs an ne_ comparator object from the two container operands and returns it. The comparator evaluates to true if the containers are not equal in content or order.
The operator is enabled only for types recognised as containers by the framework's type traits.
| Lhs_T | The left-hand container type, constrained to recognised container types. |
| Rhs_T | The right-hand container type, constrained to recognised container types. |
| [in] | lhs | The left hand side container operand. |
| [in] | rhs | The right hand side container operand. |
Definition at line 124 of file operators-inlines.h.
|
nodiscardconstexpr |
Constructs an eq_ comparator object from the two container operands and returns it. The comparator evaluates to true if the containers are equal in content and order.
The operator is enabled only for types recognised as containers by the framework's type traits.
| Lhs_T | The left-hand container type, constrained to recognised container types. |
| Rhs_T | The right-hand container type, constrained to recognised container types. |
| [in] | lhs | The left hand side container operand. |
| [in] | rhs | The right hand side container operand. |
Definition at line 106 of file operators-inlines.h.