|
micro-test-plus 4.1.0
µTest++ Testing Framework
|
Logical AND comparator struct template. More...
#include <micro-os-plus/micro-test-plus.h>
Public Member Functions | |
| constexpr | and_ (const Lhs_T &lhs={}, const Rhs_T &rhs={}) |
| Constructs a logical AND comparator for the given operands. | |
| constexpr auto | lhs (void) const |
| Retrieves the left-hand operand. | |
| constexpr | operator bool () const |
| Conversion operator to boolean. | |
| constexpr auto | rhs (void) const |
| Retrieves the right-hand operand. | |
Private Attributes | |
| const Lhs_T | lhs_ {} |
| Stores the left-hand operand. | |
| const Rhs_T | rhs_ {} |
| Stores the right-hand operand. | |
| const bool | value_ {} |
| Stores the result of the comparison. | |
Derived from binary_op_, this struct combines two sub-expressions with a logical AND operation. It enables composition of complex assertions by combining multiple conditions into a single logical whole, with reporting that shows the combined result and individual operand outcomes.
| Lhs_T | The type of the left-hand operand. |
| Rhs_T | The type of the right-hand operand. |
|
constexpr |
| lhs | The left-hand operand. |
| rhs | The right-hand operand. |
Evaluates the logical conjunction static_cast<bool>(lhs) and static_cast<bool>(rhs) and passes the result to the binary_op_ base class constructor.
Definition at line 480 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::binary_op_< Lhs_T, Rhs_T >::binary_op_(), micro_os_plus::micro_test_plus::detail::binary_op_< Lhs_T, Rhs_T >::lhs(), and micro_os_plus::micro_test_plus::detail::binary_op_< Lhs_T, Rhs_T >::rhs().
|
nodiscardconstexprinherited |
Returns the value of the left-hand operand, applying the generic getter to ensure correct extraction for both custom and standard types.
Definition at line 161 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::get(), and lhs_.
Referenced by micro_os_plus::micro_test_plus::detail::and_< Lhs_T, Rhs_T >::and_(), binary_op_(), micro_os_plus::micro_test_plus::detail::eq_< Lhs_T, Rhs_T >::eq_(), micro_os_plus::micro_test_plus::detail::ge_< Lhs_T, Rhs_T >::ge_(), micro_os_plus::micro_test_plus::detail::gt_< Lhs_T, Rhs_T >::gt_(), micro_os_plus::micro_test_plus::detail::le_< Lhs_T, Rhs_T >::le_(), micro_os_plus::micro_test_plus::detail::lt_< Lhs_T, Rhs_T >::lt_(), micro_os_plus::micro_test_plus::detail::ne_< Lhs_T, Rhs_T >::ne_(), micro_os_plus::micro_test_plus::detail::or_< Lhs_T, Rhs_T >::or_(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), and 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 147 of file detail-inlines.h.
References binary_op_(), and value_.
|
nodiscardconstexprinherited |
Returns the value of the right-hand operand, applying the generic getter to ensure correct extraction for both custom and standard types.
Definition at line 174 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::get(), and rhs_.
Referenced by micro_os_plus::micro_test_plus::detail::and_< Lhs_T, Rhs_T >::and_(), binary_op_(), micro_os_plus::micro_test_plus::detail::eq_< Lhs_T, Rhs_T >::eq_(), micro_os_plus::micro_test_plus::detail::ge_< Lhs_T, Rhs_T >::ge_(), micro_os_plus::micro_test_plus::detail::gt_< Lhs_T, Rhs_T >::gt_(), micro_os_plus::micro_test_plus::detail::le_< Lhs_T, Rhs_T >::le_(), micro_os_plus::micro_test_plus::detail::lt_< Lhs_T, Rhs_T >::lt_(), micro_os_plus::micro_test_plus::detail::ne_< Lhs_T, Rhs_T >::ne_(), micro_os_plus::micro_test_plus::detail::or_< Lhs_T, Rhs_T >::or_(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<(), and micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<().
|
privateinherited |
Definition at line 272 of file detail.h.
Referenced by binary_op_(), and lhs().
|
privateinherited |
Definition at line 280 of file detail.h.
Referenced by binary_op_(), and rhs().
|
privateinherited |