extension Namespace
The templates and the concepts for extending the µTest++ testing framework. More...
Definition
Classes Index
| struct | compare_op<Lhs_T, Rhs_T, Compare_T> |
|
Relational comparator struct template. More... | |
| struct | predicate_op<T, Predicate_T> |
|
Unary predicate struct template. More... | |
Concepts Index
| concept | any_op |
|
Concept satisfied when at least one of two types is a framework expression type. More... | |
| concept | approx_operand |
|
Concept satisfied when T is a valid operand of the approximate comparator. More... | |
| concept | checkable |
|
Concept satisfied when a type can be used as a test expression in expect() or require(). More... | |
| concept | compare_tag |
|
Concept satisfied by a tag that defines a custom comparator. More... | |
| concept | has_epsilon |
|
Deprecated concept satisfied when T is a framework floating-point wrapper with a tolerance. More... | |
| concept | is_op |
|
Concept satisfied when a type is a framework expression type. More... | |
| concept | predicate_tag |
|
Concept satisfied by a tag that defines a custom predicate. More... | |
| concept | printable |
|
Concept satisfied when a type can be appended to the message of a check result via operator<<. More... | |
Description
The templates and the concepts for extending the µTest++ testing framework.
The extension namespace holds what the applications use to write their own comparators, predicates, operators, and helpers, reported as the built-in ones are:
- compare_op and predicate_op (defined in detail.h), the expressions of the binary comparisons and of the unary predicates, parametrised by a tag that defines the operation and its symbol in the failure reports; they are built from the operands and a tag object, for example compare_op{ lhs, rhs, my_tag{} }, with the template arguments deduced, and the tag satisfies compare_tag (predicate_tag for the predicates);
- the C++20 concepts with the same constraints as the framework itself: whether a type is a framework expression type (is_op, any_op), and whether it is accepted by expect() and require() (checkable) or by the message operator (printable), and the constraints of the tags (compare_tag, predicate_tag) and of the operands of the approximate comparator (approx_operand); with the deprecated functionality enabled, they also tell whether a deprecated value wrapper carries a floating-point tolerance (has_epsilon).
The namespace is separate from the top namespace, so that using namespace micro_os_plus::micro_test_plus does not bring these generic names into the application code; refer to them qualified, as mt::extension::is_op<T>.
Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.