|
micro-test-plus 4.1.0
µTest++ Testing Framework
|
Logical NOT comparator struct template. More...
#include <micro-os-plus/micro-test-plus.h>
Public Member Functions | |
| constexpr | not_ (const T &t={}) |
| Constructs a logical NOT comparator for the given operand. | |
| constexpr auto | operand () const |
| Retrieves the wrapped operand expression. | |
| constexpr | operator bool () const |
| Conversion operator to boolean. | |
Private Attributes | |
| const T | t_ {} |
| Stores the operand. | |
| const bool | value_ {} |
| Stores the result of the operation. | |
Derived from unary_op_, this struct negates a single sub-expression, enabling test writers to assert that a condition does not hold. The negation result is computed at construction time, ensuring consistent reporting throughout the assertion framework.
| T | The type of the operand. |
|
explicitconstexpr |
| t | The operand to be negated. |
Evaluates the logical negation not static_cast<bool>(t) and passes the result to the unary_op_ base class constructor.
Definition at line 511 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::unary_op_< T >::unary_op_().
|
nodiscardconstexprinherited |
Returns the wrapped operand, applying the generic getter to ensure correct extraction for both custom and standard types.
Definition at line 121 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::get(), and t_.
Referenced by micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<().
|
nodiscardconstexprinherited |
Returns the pre-computed boolean result stored by the derived comparator's constructor.
Definition at line 108 of file detail-inlines.h.
References unary_op_(), and value_.
|
privateinherited |
|
privateinherited |