![]() |
micro-test-plus 3.2.2
µTest++ Testing Framework
|
Overloaded operators for string comparison. More...
Functions | |
constexpr auto | micro_os_plus::micro_test_plus::operators::operator!= (std::string_view lhs, std::string_view rhs) |
Non-equality operator for string_view objects. | |
constexpr auto | micro_os_plus::micro_test_plus::operators::operator== (std::string_view lhs, std::string_view rhs) |
Equality operator for string_view objects. |
The µTest++ framework provides overloaded operators specifically for comparing string types, such as std::string_view. These operators enable clear and expressive assertions when verifying string values within test cases, supporting both equality and inequality checks.
By using these dedicated string operators, developers can write concise and readable tests that accurately reflect the intended logic. The framework ensures that string comparisons are performed correctly and that any failed checks are reported with both the actual and expected values for straightforward diagnostics.
|
nodiscardconstexpr |
[in] | lhs | The left hand side std::string_view operand. |
[in] | rhs | The right hand side std::string_view operand. |
This overload of the non-equality operator enables direct comparison of two std::string_view objects within the µTest++ framework. It constructs a comparator object that can be used in test expectations and assertions to verify that two string views are not equal.
Definition at line 149 of file operators.h.
|
nodiscardconstexpr |
[in] | lhs | The left hand side std::string_view operand. |
[in] | rhs | The right hand side std::string_view operand. |
This overload of the equality operator enables direct comparison of two std::string_view objects within the µTest++ framework. It constructs a comparator object that can be used in test expectations and assertions to verify that two string views are equal.
Definition at line 128 of file operators.h.