detail Namespace
Internal implementation details for the µTest++ framework. More...
Definition
Namespaces Index
| namespace | anonymous{expression-formatter.cpp} |
|
Local helpers of the expression formatter. More... | |
| namespace | anonymous{reporter-tap.cpp} |
|
Local helpers of the TAP reporter. More... | |
| namespace | anonymous{reporter.cpp} |
|
Local helpers of the reporter base class. More... | |
| namespace | comparison_lookup |
|
Names for the checks of the comparison operators, looked up as the apply() functions look them up. More... | |
| namespace | math |
|
Internal mathematical utilities for the µTest++ testing framework. More... | |
Classes Index
| struct | and_op<Lhs_T, Rhs_T> |
|
Logical AND comparator struct template. More... | |
| struct | approx_op<Lhs_T, Rhs_T, Epsilon_T> |
|
Approximate comparator struct template. More... | |
| struct | array_operand<T> |
|
An array operand of a comparator, other than a character array. More... | |
| struct | basic_c_string<Char_T> |
|
A C string operand of a comparator. More... | |
| struct | binary_op<Lhs_T, Rhs_T> |
|
Common base struct template for binary comparators. More... | |
| class | bound_callable<Self_T, Callable_T, Args_T> |
|
Function object that holds a callable and the additional arguments it is invoked with. More... | |
| struct | callable_op |
|
Common base struct for callable-wrapping operators. More... | |
| class | callable_ref<Self_T> |
|
Non-owning reference to a callable invoked with a Self_T& argument. More... | |
| struct | callable_result |
|
The result of the invocation of the callable of a check. More... | |
| class | check_result |
|
The result of one check, reported when destroyed. More... | |
| struct | colours |
|
Colours used to highlight pass and fail results in test reports. More... | |
| struct | compare_op<Lhs_T, Rhs_T, Compare_T> |
|
Relational comparator struct template. More... | |
| struct | comparison_integer<T> |
|
The integer type used to compare a value of type T. More... | |
| struct | comparison_integer<T> |
|
The integer type used to compare a character type. More... | |
| struct | equal_to |
|
Equality tag for compare_op. More... | |
| class | expression_formatter |
|
Formats values and expressions into an owned string buffer. More... | |
| struct | failed_requirement |
|
The exception thrown to stop a test case after a failed require(). More... | |
| struct | failure_info |
|
The details of a check, displayed when it fails. More... | |
| struct | floating_point_constant<T, N, D, Size, P> |
|
Struct template representing a generic floating-point constant with custom size and precision. More... | |
| struct | greater |
|
Greater than tag for compare_op. More... | |
| struct | greater_equal |
|
Greater than or equal tag for compare_op. More... | |
| struct | indentation |
|
Parameterised stream manipulator for outputting indentation. More... | |
| struct | integral_constant<N> |
|
Struct template representing a generic integral constant. More... | |
| struct | integral_min_magnitude<T> |
|
Struct template representing the absolute value of the minimum of a signed integral type, as written in a literal. More... | |
| struct | is_bool_wrapper<T> |
|
Trait marking the wrappers of a bool, whose condition is ambiguous. More... | |
| struct | less |
|
Less than tag for compare_op. More... | |
| struct | less_equal |
|
Less than or equal tag for compare_op. More... | |
| struct | named_bool |
|
Struct representing a named boolean constant, created by the _b literal. More... | |
| struct | not_equal_to |
|
Non-equality tag for compare_op. More... | |
| struct | not_op<T> |
|
Logical NOT comparator struct template. More... | |
| struct | nothrow_op |
|
Operator struct to check if an expression does not throw any exception. More... | |
| struct | op |
|
Empty base struct for the framework expression types. More... | |
| struct | or_op<Lhs_T, Rhs_T> |
|
Logical OR comparator struct template. More... | |
| struct | output_route |
|
The destinations of a record. More... | |
| struct | plain_text |
|
Writes values as text, as the messages of the checks are written. More... | |
| struct | predicate_op<T, Predicate_T> |
|
Unary predicate struct template. More... | |
| struct | range_element<T> |
|
The type of the elements of a range, as iterated by a range-based for statement. More... | |
| struct | range_element<T> |
|
The type of the elements of a range with begin() and end() members. More... | |
| class | reporter |
|
Abstract base class for the reporters that display test results, including operand values for failures. More... | |
| class | reporter_human |
| class | reporter_tap |
|
TAP (Test Anything Protocol) implementation of reporter. More... | |
| class | runnable_base |
|
Non-template base for all runnable objects (suites and test cases). More... | |
| class | stopwatch |
|
Measures the elapsed time of an operation. More... | |
| struct | throws_op<Exception_T> |
|
Operator struct template to check if an expression throws a specific exception. More... | |
| struct | throws_op<void> |
|
Operator struct to check if an expression throws any exception. More... | |
| class | timestamp |
|
Deprecated clock reading. More... | |
| struct | unary_op<T> |
|
Common base struct template for unary comparators. More... | |
| struct | value<T> |
|
Struct template representing a generic value, accessible via a getter. More... | |
| struct | value<T> |
|
Struct template representing a floating-point value with precision control. More... | |
| struct | value_base<T> |
|
Base struct template providing common storage and accessors for run-time value-wrapper types. More... | |
Concepts Index
| concept | ambiguous_condition |
|
Concept satisfied by the wrappers of a bool, whose condition is ambiguous. More... | |
| concept | character |
|
Concept satisfied by the character types. More... | |
| concept | character_pointer |
|
Concept satisfied by the pointers to the character types. More... | |
| concept | comparable |
|
Concept satisfied when two operands can be compared by the comparator selected by Op. More... | |
| concept | comparable_operands |
|
Concept satisfied when the operands of a comparator can be written and compared. More... | |
| concept | container_like |
|
Concept satisfied when T provides both begin() and end() member functions returning an iterator and its sentinel. More... | |
| concept | formattable_range |
|
Concept satisfied when T is a range that the formatter writes element by element. More... | |
| concept | free_printable |
|
Concept satisfied by the types that have a free operator<< for the formatter. More... | |
| concept | free_range |
|
Concept satisfied when T provides begin() and end() only as functions found by argument-dependent lookup. More... | |
| concept | function_pointer_pair |
|
Concept satisfied by two pointers, one of which points to a function. More... | |
| concept | generic_callable |
|
Concept satisfied by a callable object whose call operator is not a single non-template member function. More... | |
| concept | has_value |
|
Concept satisfied when T is a framework compile-time constant. More... | |
| concept | lazy_message |
|
Concept satisfied when T is a callable object that returns a printable message. More... | |
| concept | legacy_checkable |
|
Concept satisfied when a type was accepted by expect() and require() before the exclusion of the suspicious conditions. More... | |
| concept | member_printable |
|
Concept satisfied by the types that the formatter writes with one of its own member functions operator<<. More... | |
| concept | message_argument |
|
Concept satisfied when T can be appended to the message of a check. More... | |
| concept | sign_mixed_integers |
|
Concept satisfied by two integer types of different signedness. More... | |
| concept | static_suite_body |
|
The body of a static suite written for v5.0.1, whose first parameter is a static_suite& reference. More... | |
| concept | string_like |
|
Concept satisfied when T is a string, convertible to a std::basic_string_view of a character type. More... | |
| concept | suite_body |
|
Concept satisfied by a callable object that can be the body of a suite. More... | |
| concept | suspicious_condition |
|
Concept satisfied when a type is contextually convertible to bool, but is most likely not a condition. More... | |
| concept | tag_has_symbol |
|
Concept satisfied when the tag of a comparator or of a predicate has a symbol that can be written. More... | |
| concept | test_body |
|
Concept satisfied by a callable object that can be the body of a test case. More... | |
| concept | test_values_range |
|
Concept satisfied when T is a range of values for test_each(). More... | |
| concept | test_values_tuple |
|
Concept satisfied when T is a tuple of values for test_each(). More... | |
| concept | unsupported_condition |
|
Concept satisfied by a value that expect() and require() do not accept. More... | |
Typedefs Index
| using | c_string = basic_c_string< char > |
|
The C string operand of char strings. More... | |
template <class T> | |
| using | comparison_integer_t = typename comparison_integer< T >::type |
|
Alias of the integer type used to compare the type T. More... | |
template <class T> | |
| using | comparison_operand_t = unwrapped_t< decltype(detail::as_operand(std::declval< T >()))> |
|
The type with which an operand of a comparator is compared. More... | |
template <class T> | |
| using | stored_operand_t = std::conditional_t< std::is_lvalue_reference_v< T > and not std::is_copy_constructible_v< std::remove_cvref_t< T > >, const std::remove_reference_t< T > &, std::remove_cvref_t< T > > |
|
The type with which an expression stores an operand. More... | |
template <class T> | |
| using | unwrapped_t = std::remove_cvref_t< decltype(detail::unwrap( std::declval< const std::remove_cvref_t< T > & >()))> |
|
The type of an operand, after the framework wrappers are removed by detail::unwrap(). More... | |
| using | runner_totals = counters |
| using | timestamps = stopwatch |
Enumerations Index
| enum class | check_kind { ... } |
|
The kind of a check, which determines what happens when it fails. More... | |
| enum class | comparison : unsigned char { ... } |
|
The comparison operators, as the template argument of the comparable concept. More... | |
| enum class | record_kind : uint8_t { ... } |
|
The kinds of records written by the reporters. More... | |
| enum class | throw_outcome : unsigned char { ... } |
|
The kind of exception thrown by the callable of a check. More... | |
Operators Index
template <class T, class R> | |
| constexpr auto | operator<=> (const array_operand< T > &lhs, const R &rhs) |
|
Orders an array operand and a range lexicographically. More... | |
template <character Char_T> | |
| constexpr std::strong_ordering | operator<=> (const basic_c_string< Char_T > &lhs, const basic_c_string< Char_T > &rhs) noexcept |
|
Orders two C string operands. More... | |
template <character Char_T> | |
| constexpr std::strong_ordering | operator<=> (const basic_c_string< Char_T > &lhs, std::type_identity_t< std::basic_string_view< Char_T > > rhs) noexcept |
|
Orders a C string operand and a string. More... | |
template <class T, class R> | |
| constexpr bool | operator== (const array_operand< T > &lhs, const R &rhs) |
|
Compares an array operand with a range for equality. More... | |
template <character Char_T> | |
| constexpr bool | operator== (const basic_c_string< Char_T > &lhs, const basic_c_string< Char_T > &rhs) noexcept |
|
Compares two C string operands for equality. More... | |
template <character Char_T> | |
| constexpr bool | operator== (const basic_c_string< Char_T > &lhs, std::nullptr_t) noexcept |
|
Checks whether a C string operand is a null pointer. More... | |
template <character Char_T> | |
| constexpr bool | operator== (const basic_c_string< Char_T > &lhs, std::type_identity_t< std::basic_string_view< Char_T > > rhs) noexcept |
|
Compares a C string operand with a string. More... | |
Functions Index
template <typename Lhs_T, typename Rhs_T> | |
| and_op (Lhs_T &&, Rhs_T &&) -> and_op< stored_operand_t< Lhs_T >, stored_operand_t< Rhs_T > > | |
|
Deduction guide for the logical AND comparator. More... | |
| void | append_control_escape (std::string &text, char c) |
|
Appends the escape sequence of a control character. More... | |
template <class T> | |
| void | append_number (std::string &buffer, T v) |
|
Appends the shortest decimal representation of a numeric value to a buffer. More... | |
template <class T> | |
| void | append_pointer (std::string &buffer, T *v) |
|
Appends the hexadecimal address of a pointer to a buffer. More... | |
template <class Lhs_T, class Rhs_T, class Epsilon_T> | |
| approx_op (Lhs_T &&, Rhs_T &&, Epsilon_T &&) -> approx_op< stored_operand_t< Lhs_T >, stored_operand_t< Rhs_T >, stored_operand_t< Epsilon_T > > | |
|
Deduction guide for the approximate comparator. More... | |
template <class T> | |
| constexpr auto | as_comparison_integer (const T value) noexcept -> comparison_integer_t< T > |
|
Converts an integer or a character to the type used to compare it. More... | |
template <class T> | |
| constexpr auto | as_operand (T &&t) noexcept -> decltype(auto) |
|
Prepares an operand of a comparator. More... | |
template <typename Self_T, typename Callable_T, typename... Args_T> | |
| auto | bind_callable (Callable_T &&callable, Args_T &&... arguments) |
|
Creates the function object that holds the body of a test case or suite. More... | |
template <class Lhs_T, class Rhs_T, class Compare_T> | |
| compare_op (Lhs_T &&, Rhs_T &&, Compare_T) -> compare_op< stored_operand_t< decltype(detail::as_operand(std::declval< Lhs_T >()))>, stored_operand_t< decltype(detail::as_operand(std::declval< Rhs_T >()))>, Compare_T > | |
|
Deduction guide for the relational comparator. More... | |
template <class Lhs_T, class Rhs_T, class Epsilon_T> | |
| constexpr bool | differ_by_at_most (Lhs_T lhs, Rhs_T rhs, Epsilon_T epsilon) |
|
Tells whether two numbers differ by at most a tolerance. More... | |
| reporter & | endl (reporter &stream) |
|
Output stream manipulator for ending a line in test reports. More... | |
| void | escape_control_characters (std::string &name) |
|
Escapes the control characters of a name. More... | |
| indentation | indent (size_t level) |
|
Factory function that creates an indentation manipulator. More... | |
template <class T, char... Cs> | |
| constexpr auto | integral_literal (void) |
|
Creates the compile-time constant of an integer literal. More... | |
template <typename Lhs_T, typename Rhs_T> | |
| or_op (Lhs_T &&, Rhs_T &&) -> or_op< stored_operand_t< Lhs_T >, stored_operand_t< Rhs_T > > | |
|
Deduction guide for the logical OR comparator. More... | |
template <class T, class Predicate_T> | |
| predicate_op (T &&, Predicate_T) -> predicate_op< stored_operand_t< decltype(detail::as_operand(std::declval< T >()))>, Predicate_T > | |
|
Deduction guide for the unary predicate. More... | |
| void | read_clock (timespec &ts) noexcept |
|
Reads the system clock. More... | |
template <class Tag_T> | |
| constexpr void | reject_compare_tag (void) noexcept |
|
Stops the compilation of a compare_op whose tag is rejected, with a message that tells why. More... | |
template <comparison Op, class Lhs_T, class Rhs_T> | |
| constexpr void | reject_comparison (void) noexcept |
|
Stops the compilation of a comparator whose operands are rejected, with a message that tells why. More... | |
template <class Tag_T> | |
| constexpr void | reject_predicate_tag (void) noexcept |
|
Stops the compilation of a predicate_op whose tag is rejected, with a message that tells why. More... | |
template <typename Callable_T, typename... Args_T> | |
| constexpr void | reject_suite_body (void) noexcept |
|
Stops the compilation with a message that tells what the body of a suite takes. More... | |
template <typename Callable_T, typename... Args_T> | |
| constexpr void | reject_test_body (void) noexcept |
|
Stops the compilation with a message that tells what the body of a test case takes. More... | |
template <class Self_T, class Values_T, class Callable_T> | |
| void | test_each_value (Self_T &self, const located_name &name, Values_T &&values, Callable_T &callable) |
|
Adds and runs a test case for each value. More... | |
template <class T> | |
| auto | unwrap (const T &t) -> decltype(auto) constexpr |
|
Returns the value wrapped by a framework type, or the operand itself. More... | |
template <class T> | |
| constexpr auto | unwrap (const T &t) -> decltype(auto) |
|
Returns the value wrapped by a framework type, or the operand itself. More... | |
template <class Lhs_T, class Rhs_T> | |
| constexpr bool | within_tolerance (const Lhs_T &lhs, const Rhs_T &rhs) |
|
Deprecated check whether two operands are equal within the tolerance of the floating-point wrappers. More... | |
Variables Index
| constexpr colours | colours_none {} |
|
Predefined colour set, without escape sequences. More... | |
| constexpr colours | colours_red_green = ... |
|
Predefined colour set, with green for pass and red for fail. More... | |
template <typename... Ts> | |
| constexpr bool | dependent_false_v = false |
|
A value that is always false, but depends on the template arguments. More... | |
Description
Internal implementation details for the µTest++ framework.
The detail namespace encapsulates the internal mechanisms, helper structures, and implementation utilities employed by the µTest++ testing framework. These components do not form part of the public API and may be modified without prior notice.
Within this namespace, one will find the deprecated value wrappers (declared in deprecated.h), the value unwrapping helper, comparator structures for logical and relational operations, mechanisms for exception checking, the reporters, the check result, and the expression formatter.
All definitions within detail are intended exclusively for internal use; the applications do not need to name them.
Typedefs
c_string
|
The C string operand of char strings.
The type to which as_operand() converts the char arrays, including the string literals, and the char pointers; the framework itself names basic_c_string, and the alias is kept for the tests that name the type of a comparator.
Definition at line 1746 of file detail.h.
comparison_integer_t
|
Alias of the integer type used to compare the type T.
Used by sign_mixed_integers, to tell the signedness, and by as_comparison_integer(), to convert the operands.
- Template Parameters
-
T The type of the operand.
Definition at line 326 of file detail-inlines.h.
comparison_operand_t
|
The type with which an operand of a comparator is compared.
The type of the operand after as_operand() and unwrap(), without references and qualifiers; for example detail::basic_c_string<char> for a string literal.
- Template Parameters
-
T The type deduced for the operand, possibly a reference.
Definition at line 386 of file detail-inlines.h.
stored_operand_t
|
The type with which an expression stores an operand.
Applied by the deduction guides and the factory functions to the type deduced for a forwarding reference: X& (or const X&) for an lvalue, X for an rvalue.
An lvalue is copied into the expression, so that an expression built in a function from its parameters, and returned, does not refer to the destroyed locals of that function. An rvalue is moved into the expression, so that an expression that outlives the statement, like auto op = eq (f (), 1);, does not refer to a destroyed temporary.
The arrays and the character pointers are first converted by as_operand() to basic_c_string or array_operand, which are stored, but which refer to the characters or to the elements of the operand, without copying them; such an expression is valid only as long as the operand.
Only an lvalue of a class type that cannot be copied (for example a std::unique_ptr) is stored as a const reference; such a reference remains valid only as long as the named operand, which is always the case within the statement that checks the expression.
- Template Parameters
-
T The type deduced for a forwarding reference.
Definition at line 234 of file detail.h.
unwrapped_t
|
The type of an operand, after the framework wrappers are removed by detail::unwrap().
- Template Parameters
-
T The type of the operand, possibly a reference.
Without references and qualifiers; for example int for a to_i wrapper and for a 42_i literal, and the type itself for the other operands. Used by extension::approx_operand and by comparison_operand_t.
Definition at line 828 of file detail.h.
Enumerations
check_kind
| strong |
The kind of a check, which determines what happens when it fails.
- Enumeration values
An enumeration rather than a Boolean flag, so that the call sites name the kind of the check.
Definition at line 93 of file check-result.h.
comparison
| strong |
The comparison operators, as the template argument of the comparable concept.
- Enumeration values
-
equal The == operator, checked by eq() not_equal The != operator, checked by ne() greater The > operator, checked by gt() greater_equal The >= operator, checked by ge() less The < operator, checked by lt() less_equal The <= operator, checked by le()
A single concept, parametrised by the operator, checks the operands of all the comparators (eq(), ne(), gt(), ge(), lt(), and le()).
Definition at line 416 of file detail-inlines.h.
record_kind
| strong |
The kinds of records written by the reporters.
- Enumeration values
The output policy, which decides where each kind of record is written at each verbosity level, is in reporter::route(). The concrete reporters only format the records and ask where they go.
Definition at line 160 of file reporter.h.
throw_outcome
| strong |
The kind of exception thrown by the callable of a check.
- Enumeration values
-
none Nothing was thrown, or the expected exception was thrown std_exception A std::exception that was not the expected one was thrown; its what() is kept unknown_exception Another exception was thrown
Kept only when the check failed, to be written in the report.
Operators
operator<=>()
| nodiscard constexpr |
Orders an array operand and a range lexicographically.
- Template Parameters
-
T The element type of the array operand.
R The type of the range.
- Parameters
-
lhs The array operand.
rhs The range, which may be another array operand.
- Returns
The lexicographic order of the elements.
A range that is a prefix of the other is the lesser one.
Definition at line 1696 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::array_operand< T >::begin, micro_os_plus::micro_test_plus::detail::array_operand< T >::end and operator<=>.
operator<=>()
| nodiscard constexpr noexcept |
Orders two C string operands.
- Template Parameters
-
Char_T The character type.
- Parameters
-
lhs The left operand.
rhs The right operand.
- Returns
The lexicographic order of the characters; a null pointer is equal to another null pointer and less than any string.
A null pointer orders before any string.
Definition at line 1594 of file detail-inlines.h.
Referenced by operator<=>.
operator<=>()
| nodiscard constexpr noexcept |
Orders a C string operand and a string.
- Template Parameters
-
Char_T The character type.
- Parameters
-
lhs The C string operand.
rhs The string.
- Returns
The lexicographic order of the characters; a null pointer is less than any string.
A null pointer orders before any string.
Definition at line 1610 of file detail-inlines.h.
operator==()
| nodiscard constexpr |
Compares an array operand with a range for equality.
- Template Parameters
-
T The element type of the array operand.
R The type of the range.
- Parameters
-
lhs The array operand.
rhs The range, which may be another array operand.
- Return Values
-
true The ranges have the same size and equal elements.
false Otherwise.
Ranges of different sizes are not equal, without comparing any element. The elements are compared as the scalar operands of eq() are, with equal_to::apply(), so that integers of different signedness are compared by value, not by converting the signed one to the unsigned type.
Definition at line 1681 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::array_operand< T >::begin and micro_os_plus::micro_test_plus::detail::array_operand< T >::end.
operator==()
| nodiscard constexpr noexcept |
Compares two C string operands for equality.
- Template Parameters
-
Char_T The character type.
- Parameters
-
lhs The left operand.
rhs The right operand.
- Return Values
-
true Both are null, or both are strings with the same characters.
false Otherwise.
Two null pointers are equal; a null pointer is not equal to any string, not even an empty one.
Definition at line 1555 of file detail-inlines.h.
operator==()
| nodiscard constexpr noexcept |
Checks whether a C string operand is a null pointer.
- Template Parameters
-
Char_T The character type.
- Parameters
-
lhs The C string operand.
- Return Values
-
true The operand is a null pointer.
false Otherwise.
Returns whether the operand is a null pointer.
Definition at line 1584 of file detail-inlines.h.
operator==()
| nodiscard constexpr noexcept |
Compares a C string operand with a string.
Also used for the standard strings of the same character type, which convert to the string view, and, as a rewritten candidate, with the operands in the reverse order.
- Template Parameters
-
Char_T The character type.
- Parameters
-
lhs The C string operand.
rhs The string.
- Return Values
-
true The operand is not null and has the same characters.
false Otherwise.
A null pointer is not equal to any string.
Definition at line 1571 of file detail-inlines.h.
Functions
and_op()
|
Deduction guide for the logical AND comparator.
Deduces Lhs_T and Rhs_T from the constructor arguments, so that and_op{ lhs, rhs } can be written without explicit template arguments. The operand types are deduced as forwarding references, and stored as stored_operand_t selects.
append_control_escape()
|
Appends the escape sequence of a control character.
Writes the usual escape of the character (\\0, \\a, \\b, \\t, \\n, \\v, \\f, or \\r), or \\xHH for the other ones. Used for the characters of the messages and of the names that would otherwise reach the console and the output files unchanged. Defined in src/expression-formatter.cpp.
- Parameters
-
text The text to append to.
c The control character.
The usual escapes for the characters that have one; the other ones, including DEL, as \\xHH.
Definition at line 401 of file expression-formatter.cpp.
Reference append_control_escape.
Referenced by append_control_escape, micro_os_plus::micro_test_plus::detail::anonymous{expression-formatter.cpp}::append_plain, escape_control_characters and micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<.
append_number()
|
Appends the shortest decimal representation of a numeric value to a buffer.
- Template Parameters
-
T The numeric type to format.
- Parameters
-
buffer The string to append to.
v The value to format.
- Returns
Nothing.
The value is formatted into a local buffer, which is then appended to buffer.
For long double, a platform-specific path is chosen:
- On Windows and on platforms where long double has the same storage width as double (e.g. 32-bit Arm), the value is cast to double and formatted with std::to_chars.
- On all other platforms (e.g. x86-64 Linux/macOS with 80-bit extended precision, or AArch64 and RISC-V with 128-bit quad precision), snprintf with %.*Lg is used as a portable fallback, because std::to_chars for long double may be unavailable (e.g. when linking with lld). The precision starts at LDBL_DIG and is increased until the text reads back, with strtold, as the same value, up to LDBL_DECIMAL_DIG, which always reads back exactly. This gives the shortest exact form, as std::to_chars gives for the other types; a shorter form would need fewer than LDBL_DIG digits, and Lg removes the trailing zeros, so starting at LDBL_DIG does not lose it. For zero and the subnormal values, which have fewer significant digits, the precision starts at 1. The value of errno, which strtold may set for subnormal values, is preserved. If no precision reads back exactly, the C library handles long double with the precision of double (e.g. newlib on AArch64 and RISC-V), and the value is cast to double and formatted with std::to_chars, as above.
For all other numeric types, std::to_chars is called directly, providing locale-independent formatting. The snprintf() path uses the decimal point of the C locale, which is . unless the application changes it with setlocale().
Definition at line 1348 of file detail-inlines.h.
Reference append_number.
Referenced by micro_os_plus::micro_test_plus::detail::expression_formatter::append_first_difference, append_number, 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<<, 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::reporter::operator<<.
append_pointer()
|
Appends the hexadecimal address of a pointer to a buffer.
Shared by the reporter and the expression_formatter, so that the pointers are displayed identically in the messages and in the expressions. Pointers to const or volatile objects, and function pointers, are accepted too.
- Template Parameters
-
T The type pointed to (an object or a function type).
- Parameters
-
buffer The string to append to.
v The pointer.
- Returns
Nothing.
Null pointers are rendered as "0x0", regardless of the platform, avoiding platform-specific representations such as "(nil)" on Linux/glibc. Non-null pointers are formatted with snprintf(), using the p specifier.
The p specifier expects a void*. Object pointers are converted implicitly to const volatile void*, which accepts any qualification, and the qualifiers are then removed with const_cast; a reinterpret_cast to void* would not compile for pointers to const objects. The object is not accessed. Function pointers, which do not convert to void* implicitly, use reinterpret_cast.
Definition at line 1454 of file detail-inlines.h.
Reference append_pointer.
Referenced by append_pointer, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<< and micro_os_plus::micro_test_plus::detail::reporter::operator<<.
approx_op()
|
Deduction guide for the approximate comparator.
Deduces Lhs_T, Rhs_T, and Epsilon_T from the constructor arguments, which are stored as stored_operand_t selects.
as_comparison_integer()
| nodiscard constexpr noexcept |
Converts an integer or a character to the type used to compare it.
The conversion keeps the value, since the type has the same size and signedness. Applied to both operands of the std::cmp_*() functions, which do not accept the character types.
- Template Parameters
-
T The type of the operand.
- Parameters
-
value The operand.
- Returns
The value, as comparison_integer_t<T>.
Definition at line 343 of file detail-inlines.h.
Reference as_comparison_integer.
Referenced by micro_os_plus::micro_test_plus::detail::equal_to::apply, micro_os_plus::micro_test_plus::detail::greater::apply, micro_os_plus::micro_test_plus::detail::greater_equal::apply, micro_os_plus::micro_test_plus::detail::less::apply, micro_os_plus::micro_test_plus::detail::less_equal::apply, micro_os_plus::micro_test_plus::detail::not_equal_to::apply and as_comparison_integer.
as_operand()
| nodiscard constexpr noexcept |
Prepares an operand of a comparator.
The arrays and the pointers of the character types (char, wchar_t, char8_t, char16_t, and char32_t, but not signed char or unsigned char, which are byte buffers) are converted to basic_c_string, so that they are compared by content; the other arrays, including those of volatile characters, are converted to array_operand, so that they are compared element by element, the functions to function pointers, and all other operands are returned unchanged, so the other pointers, including the pointers to volatile characters, and the functions are compared by address.
The other operands are forwarded, so that the comparator moves a temporary, and refers to a named operand.
- Template Parameters
-
T The type deduced for the forwarding reference.
- Parameters
-
t The operand.
- Returns
A basic_c_string for the C strings, an array_operand for the other arrays, otherwise t, forwarded.
Arrays of the character types are converted using their size as a bound, pointers to them using the null terminator; the const qualifier of the characters is ignored. The volatile characters are not strings, since basic_c_string cannot refer to them: an array of them is converted to array_operand, like the other arrays, and compared element by element, and a pointer to them is forwarded, and compared by address, like the other pointers. The functions are converted to function pointers. Every other operand is forwarded, unchanged, as an lvalue or an rvalue reference.
The qualifiers of an array are those of its elements, so the element type is taken from the type of the argument, not from the type without qualifiers, which would lose the volatile of the elements, and the conversion to the pointer to const elements would not compile.
Definition at line 1725 of file detail-inlines.h.
Reference as_operand.
Referenced by micro_os_plus::micro_test_plus::detail::compare_op< Lhs_T, Rhs_T, Compare_T >::compare_op, micro_os_plus::micro_test_plus::detail::predicate_op< T, Predicate_T >::predicate_op, as_operand, compare_op, micro_os_plus::micro_test_plus::eq, micro_os_plus::micro_test_plus::ge, micro_os_plus::micro_test_plus::gt, micro_os_plus::micro_test_plus::le, micro_os_plus::micro_test_plus::lt and micro_os_plus::micro_test_plus::ne.
bind_callable()
| nodiscard |
Creates the function object that holds the body of a test case or suite.
Without additional arguments, the callable already has the signature void (Self_T&), and a copy of it is returned, without a wrapper.
Otherwise, a bound_callable stores copies of the callable and of the arguments (decayed, as by auto), since a suite may run after the caller's temporaries are gone; the callable receives the copies as non-const lvalues. A reference parameter thus refers to the copy; to refer to the caller's object, pass a pointer, or std::ref(), which converts to a T& parameter (an auto& parameter receives the std::reference_wrapper itself).
The returned object holds a copy of the callable (decayed, as by auto) when there are no additional arguments; otherwise it is a bound_callable that holds copies of the callable and of the arguments, and passes the arguments after the leading reference, which is passed when the body is invoked. No memory is allocated, other than by the copies themselves.
A suite stores the object in a std::function, since it runs later; a test case, which runs immediately, refers to it with a callable_ref.
- Template Parameters
-
Self_T The type referred to by the first parameter of the callable (test_case or suite).
Callable_T The type of the callable object.
Args_T The types of the additional callable arguments.
- Parameters
-
callable A generic callable object, usually a lambda.
arguments A possibly empty list of arguments forwarded to the callable after the leading Self_T& reference.
- Returns
The function object, invocable with a Self_T& argument.
Definition at line 344 of file test-inlines.h.
Reference bind_callable.
Referenced by bind_callable and micro_os_plus::micro_test_plus::detail::runnable_base::create_test_case.
compare_op()
|
Deduction guide for the relational comparator.
Deduces Lhs_T, Rhs_T, and Compare_T from the constructor arguments, so that compare_op{ lhs, rhs, equal_to{} } can be written without explicit template arguments. The operand types are deduced as forwarding references, prepared by as_operand(), and stored as stored_operand_t selects.
Definition at line 941 of file detail.h.
References as_operand and differ_by_at_most.
differ_by_at_most()
| nodiscard constexpr |
Tells whether two numbers differ by at most a tolerance.
If the three values are integers, the distance is computed exactly, as an unsigned value, also for operands of mixed signedness, and compared with the tolerance with std::cmp_less_equal(), so that neither overflows nor wraps around. Otherwise, the values are converted to their common floating-point type, and the absolute value of the difference is compared with the tolerance. A negative tolerance, or a NaN, makes the result false.
- Template Parameters
-
Lhs_T The arithmetic type of the first value.
Rhs_T The arithmetic type of the second value.
Epsilon_T The arithmetic type of the tolerance.
- Parameters
-
lhs The first value.
rhs The second value.
epsilon The tolerance.
- Return Values
-
true The distance between the values is less than or equal to the tolerance.
false Otherwise.
For the integers, the larger value is selected with std::cmp_less(), and the distance is computed in std::uintmax_t: when both values have the same sign, as the modular difference of their conversions, which is exact; otherwise, as the sum of the larger value and of the magnitude of the negative one. A sum that does not fit in std::uintmax_t is flagged as an overflow, and gives false, since the true distance is larger than any tolerance. The tolerance is compared with std::cmp_less_equal(), so a negative one gives false.
For the other types, the values are converted to their common type, which is a floating-point one, so std::int64_t values compared with a float tolerance lose precision; the comparison is inclusive, so a distance equal to the tolerance succeeds. Two equal values, including two infinities of the same sign, whose difference would be NaN, are at the distance zero; a NaN operand always fails.
Definition at line 940 of file detail-inlines.h.
References micro_os_plus::micro_test_plus::detail::math::abs and differ_by_at_most.
Referenced by micro_os_plus::micro_test_plus::detail::approx_op< Lhs_T, Rhs_T, Epsilon_T >::approx_op, compare_op and differ_by_at_most.
endl()
|
Output stream manipulator for ending a line in test reports.
Calls reporter::end_line(), which appends a line ending to the internal buffer. Unlike std::endl, it does not flush; the buffer is written later, by the concrete reporters.
- Parameters
-
stream Reference to the reporter instance.
- Returns
Reference to the same reporter instance, enabling chaining of output operations.
The endl function calls reporter::end_line(), which appends a newline character to the buffer of the specified reporter.
Definition at line 218 of file reporter.cpp.
References micro_os_plus::micro_test_plus::detail::reporter::end_line and endl.
Referenced by endl, micro_os_plus::micro_test_plus::detail::reporter_human::fail_suite, micro_os_plus::micro_test_plus::detail::reporter_tap::fail_suite, micro_os_plus::micro_test_plus::detail::reporter_tap::output_fail_prefix, micro_os_plus::micro_test_plus::detail::reporter_human::output_fail_suffix, micro_os_plus::micro_test_plus::detail::reporter_tap::output_fail_suffix, micro_os_plus::micro_test_plus::detail::reporter_human::output_pass_suffix, micro_os_plus::micro_test_plus::detail::reporter_tap::output_pass_suffix and micro_os_plus::micro_test_plus::detail::reporter_tap::pass_without_text.
escape_control_characters()
|
Escapes the control characters of a name.
Replaces, in place, the control characters other than the tab, including the line feed and the NUL, with their escape sequences, so that the names reach the console and the output files as one line of visible text. Defined in src/test.cpp.
- Parameters
-
name The name to escape.
The text is scanned first, so that a name without control characters is not touched. The tab is kept; all the other control characters, including the line feed and the NUL, and DEL, are replaced.
Definition at line 80 of file test.cpp.
References append_control_escape and escape_control_characters.
Referenced by micro_os_plus::micro_test_plus::located_name::located_name, micro_os_plus::micro_test_plus::located_name::located_name, micro_os_plus::micro_test_plus::located_name::located_name, micro_os_plus::micro_test_plus::located_name::located_name and escape_control_characters.
indent()
| inline nodiscard |
Factory function that creates an indentation manipulator.
Returns an indentation aggregate initialised with level.
Allows writing reporter << indent(n) instead of constructing the manipulator explicitly.
- Parameters
-
level The number of four-space indentation levels.
- Returns
An indentation value for use with operator<<.
Definition at line 64 of file reporter-inlines.h.
Reference indent.
Referenced by micro_os_plus::micro_test_plus::detail::reporter_human::begin_test_case, micro_os_plus::micro_test_plus::detail::reporter_tap::begin_test_case, micro_os_plus::micro_test_plus::detail::reporter_human::display_open_heading, micro_os_plus::micro_test_plus::detail::reporter_tap::display_open_heading, micro_os_plus::micro_test_plus::detail::reporter_tap::end_suite, micro_os_plus::micro_test_plus::detail::reporter_human::end_test_case, micro_os_plus::micro_test_plus::detail::reporter_tap::end_test_case, micro_os_plus::micro_test_plus::detail::reporter_human::fail_suite, micro_os_plus::micro_test_plus::detail::reporter_tap::fail_suite, indent, micro_os_plus::micro_test_plus::detail::reporter_human::output_fail_prefix, micro_os_plus::micro_test_plus::detail::reporter_tap::output_fail_prefix, micro_os_plus::micro_test_plus::detail::reporter_tap::output_fail_suffix, micro_os_plus::micro_test_plus::detail::reporter_human::output_pass_prefix, micro_os_plus::micro_test_plus::detail::reporter_tap::output_pass_prefix, micro_os_plus::micro_test_plus::detail::reporter_tap::pass_without_text, micro_os_plus::micro_test_plus::detail::reporter_human::skip_test_case and micro_os_plus::micro_test_plus::detail::reporter_tap::skip_test_case.
integral_literal()
| nodiscard constexpr |
Creates the compile-time constant of an integer literal.
- Template Parameters
-
T The integral type of the literal.
Cs The characters of the literal, as received by a literal operator template.
Used by the integer literal operators (_i, _u8, etc.).
- Parameters
None.
- Returns
An integral_constant with the value of the literal, or, when the value is the absolute value of the minimum of a signed T, an integral_min_magnitude<T>, valid only when negated.
The value is checked by math::integer_magnitude(), which accepts, for the signed types, the absolute value of the minimum; this value does not fit in T, so it is represented by integral_min_magnitude<T>.
Definition at line 581 of file deprecated-inlines.h.
References micro_os_plus::micro_test_plus::detail::integral_constant< N >::integral_constant, micro_os_plus::micro_test_plus::detail::math::integer_magnitude and integral_literal.
Referenced by integral_literal, micro_os_plus::micro_test_plus::literals::operator""_c, micro_os_plus::micro_test_plus::literals::operator""_i, micro_os_plus::micro_test_plus::literals::operator""_i16, micro_os_plus::micro_test_plus::literals::operator""_i32, micro_os_plus::micro_test_plus::literals::operator""_i64, micro_os_plus::micro_test_plus::literals::operator""_i8, micro_os_plus::micro_test_plus::literals::operator""_l, micro_os_plus::micro_test_plus::literals::operator""_ll, micro_os_plus::micro_test_plus::literals::operator""_s, micro_os_plus::micro_test_plus::literals::operator""_sc, micro_os_plus::micro_test_plus::literals::operator""_u, micro_os_plus::micro_test_plus::literals::operator""_u16, micro_os_plus::micro_test_plus::literals::operator""_u32, micro_os_plus::micro_test_plus::literals::operator""_u64, micro_os_plus::micro_test_plus::literals::operator""_u8, micro_os_plus::micro_test_plus::literals::operator""_uc, micro_os_plus::micro_test_plus::literals::operator""_ul, micro_os_plus::micro_test_plus::literals::operator""_ull and micro_os_plus::micro_test_plus::literals::operator""_us.
or_op()
|
Deduction guide for the logical OR comparator.
Deduces Lhs_T and Rhs_T from the constructor arguments, so that or_op{ lhs, rhs } can be written without explicit template arguments. The operand types are deduced as forwarding references, and stored as stored_operand_t selects.
predicate_op()
|
Deduction guide for the unary predicate.
Deduces T and Predicate_T from the constructor arguments, so that predicate_op{ t, even{} } can be written without explicit template arguments. The operand type is deduced as a forwarding reference, prepared by as_operand(), and stored as stored_operand_t selects.
read_clock()
| noexcept |
Reads the system clock.
Isolates the platform-specific access to the system clock, used by stopwatch and by the deprecated timestamp class. The clock is monotonic on POSIX; without a clock, ts is left unchanged, so the callers clear it first when a zero value must mean that the clock was not read.
- Parameters
-
[out] ts The timespec where the reading is stored.
- Returns
Nothing.
On Windows, the current time is captured via timespec_get() with TIME_UTC. On POSIX platforms with CLOCK_MONOTONIC defined, clock_gettime(CLOCK_MONOTONIC) is used to obtain a monotonic reading. On platforms where neither macro is defined, ts is left unchanged.
Definition at line 66 of file stopwatch.cpp.
Reference read_clock.
Referenced by micro_os_plus::micro_test_plus::detail::timestamp::timestamp, read_clock, micro_os_plus::micro_test_plus::detail::stopwatch::start, micro_os_plus::micro_test_plus::detail::stopwatch::stop, micro_os_plus::micro_test_plus::detail::stopwatch::timestamp_begin and micro_os_plus::micro_test_plus::detail::stopwatch::timestamp_end.
reject_compare_tag()
| constexpr noexcept |
Stops the compilation of a compare_op whose tag is rejected, with a message that tells why.
Always fails the static assertion that applies, since it is called only when extension::compare_tag is not satisfied: the missing or unprintable symbol is reported first, then the apply() that cannot be called with the operands, or whose result is not convertible to bool.
- Template Parameters
-
Tag_T The tag of the comparator.
- Parameters
None.
- Returns
Nothing.
Definition at line 778 of file detail-inlines.h.
Reference reject_compare_tag.
Referenced by reject_compare_tag.
reject_comparison()
| constexpr noexcept |
Stops the compilation of a comparator whose operands are rejected, with a message that tells why.
Always fails the static assertion that applies, since it is called only when comparable_operands is not satisfied: an operand that cannot be written is reported first, then the operator that the operands do not support. Called by the overloads of the comparators that accept the rejected operands, so that the compiler shows this message instead of a list of the unsatisfied constraints.
- Template Parameters
-
Op The comparison of the comparator.
Lhs_T The type of the left operand.
Rhs_T The type of the right operand.
- Parameters
None.
- Returns
Nothing.
Definition at line 557 of file detail-inlines.h.
References equal, greater, greater_equal, less, not_equal and reject_comparison.
Referenced by reject_comparison.
reject_predicate_tag()
| constexpr noexcept |
Stops the compilation of a predicate_op whose tag is rejected, with a message that tells why.
As reject_compare_tag(), for the tag of a predicate, whose apply() takes one operand; called only when extension::predicate_tag is not satisfied.
- Template Parameters
-
Tag_T The tag of the predicate.
- Parameters
None.
- Returns
Nothing.
Definition at line 815 of file detail-inlines.h.
Reference reject_predicate_tag.
Referenced by reject_predicate_tag.
reject_suite_body()
| constexpr noexcept |
Stops the compilation with a message that tells what the body of a suite takes.
Always fails the static assertion that applies, since it is called only when suite_body is not satisfied. A body that cannot be copied, or a body written for a test case, is recognised, to say so.
Called by the overloads of runner::add_suite() and of the static_suite constructor that are selected when the callable is not a valid body, as reject_test_body() is for the test cases.
- Template Parameters
-
Callable_T The type of the callable.
Args_T The types of the additional arguments.
- Parameters
None.
- Returns
Nothing.
Definition at line 448 of file test-inlines.h.
References dependent_false_v and reject_suite_body.
Referenced by micro_os_plus::micro_test_plus::runner::add_suite and reject_suite_body.
reject_test_body()
| constexpr noexcept |
Stops the compilation with a message that tells what the body of a test case takes.
Always fails the static assertion that applies, since it is called only when test_body is not satisfied. A body written for a suite is recognised, to say so.
Called by the overloads of test_case::test() and suite::test() that are selected when the callable is not a valid body, so that the diagnostic names the mistake in the terms of the application, instead of the concepts and the instantiation stack. Never called at run time.
- Template Parameters
-
Callable_T The type of the callable.
Args_T The types of the additional arguments.
- Parameters
None.
- Returns
Nothing.
Definition at line 422 of file test-inlines.h.
References dependent_false_v and reject_test_body.
Referenced by reject_test_body.
test_each_value()
|
Adds and runs a test case for each value.
For each value, the name is built in a local string, which lives while the test case runs, since a test case runs within the call to test(), and the test case is added with test(), with the location of the call to test_each(). The callable receives each value as a const lvalue, referring to the element itself; neither the values nor the callable are copied. The values of a range are iterated by a range-based for statement, and those of a tuple are expanded by std::apply(), in order.
The common implementation of test_case::test_each() and suite::test_each().
- Template Parameters
-
Self_T The type of the test case or suite.
Values_T The type of the range or tuple of values.
Callable_T The type of the callable object.
- Parameters
-
self The test case or suite to which the test cases are added.
name The common name of the test cases.
values The range or tuple of values.
callable The callable object, invoked with the test case and each value.
- Returns
Nothing.
Definition at line 1029 of file test-inlines.h.
References micro_os_plus::micro_test_plus::detail::plain_text::append, micro_os_plus::micro_test_plus::located_name::location, micro_os_plus::micro_test_plus::located_name::name and test_each_value.
Referenced by micro_os_plus::micro_test_plus::suite::test_each, micro_os_plus::micro_test_plus::suite::test_each, micro_os_plus::micro_test_plus::test_case::test_each, micro_os_plus::micro_test_plus::test_case::test_each and test_each_value.
unwrap()
| nodiscard constexpr |
Returns the value wrapped by a framework type, or the operand itself.
Always call it qualified, as detail::unwrap(), so that argument-dependent lookup cannot select a function of the application, defined in the namespace of an operand.
The operand is returned by reference, without a copy; the result is valid only as long as the operand.
- Template Parameters
-
T The type of the operand.
- Parameters
-
t The operand.
- Returns
The value returned by t.get() for the framework wrappers (the literals and the to_* wrappers), otherwise a reference to t.
If the type T is a framework expression type (see extension::is_op) that provides a get() member function, it is invoked and its result returned. Otherwise a reference to the argument itself is returned, so that the types of the application, even those with a get() member function, are compared with their own operators, without a copy. The selection is performed at compile time via if constexpr with an inline requires expression; the return type is deduced with decltype (auto) from the selected branch.
Declaration at line 167 of file detail.h, definition at line 98 of file detail-inlines.h.
Reference unwrap.
Referenced by micro_os_plus::micro_test_plus::detail::approx_op< Lhs_T, Rhs_T, Epsilon_T >::approx_op, micro_os_plus::micro_test_plus::detail::compare_op< Lhs_T, Rhs_T, Compare_T >::compare_op, micro_os_plus::micro_test_plus::detail::predicate_op< T, Predicate_T >::predicate_op, micro_os_plus::micro_test_plus::detail::approx_op< Lhs_T, Rhs_T, Epsilon_T >::epsilon, micro_os_plus::micro_test_plus::detail::binary_op< Lhs_T, Rhs_T >::lhs, micro_os_plus::micro_test_plus::detail::unary_op< T >::operand, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::binary_op< Lhs_T, Rhs_T >::rhs, unwrap and within_tolerance.
unwrap()
| nodiscard constexpr |
Returns the value wrapped by a framework type, or the operand itself.
If the type T is a framework expression type (see extension::is_op) that provides a get() member function, it is invoked and its result returned. Otherwise a reference to the argument itself is returned, so that the types of the application, even those with a get() member function, are compared with their own operators, without a copy. The selection is performed at compile time via if constexpr with an inline requires expression; the return type is deduced with decltype (auto) from the selected branch.
Always call it qualified, as detail::unwrap(), so that argument-dependent lookup cannot select a function of the application, defined in the namespace of an operand.
The operand is returned by reference, without a copy; the result is valid only as long as the operand.
- Template Parameters
-
T The type of the operand.
- Parameters
-
t The operand.
- Returns
The value returned by t.get() for the framework wrappers (the literals and the to_* wrappers), otherwise a reference to t.
Definition at line 98 of file detail-inlines.h.
Reference unwrap.
Referenced by micro_os_plus::micro_test_plus::detail::approx_op< Lhs_T, Rhs_T, Epsilon_T >::approx_op, micro_os_plus::micro_test_plus::detail::compare_op< Lhs_T, Rhs_T, Compare_T >::compare_op, micro_os_plus::micro_test_plus::detail::predicate_op< T, Predicate_T >::predicate_op, micro_os_plus::micro_test_plus::detail::approx_op< Lhs_T, Rhs_T, Epsilon_T >::epsilon, micro_os_plus::micro_test_plus::detail::binary_op< Lhs_T, Rhs_T >::lhs, micro_os_plus::micro_test_plus::detail::unary_op< T >::operand, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::binary_op< Lhs_T, Rhs_T >::rhs, unwrap and within_tolerance.
Variables
colours_none
| constexpr |
Predefined colour set, without escape sequences.
Used by the formatters that write the messages of the checks, which are never coloured; all members are empty strings.
Definition at line 184 of file expression-formatter.h.
Referenced by micro_os_plus::micro_test_plus::detail::expression_formatter::expression_formatter and micro_os_plus::micro_test_plus::detail::expression_formatter::expression_formatter.
colours_red_green
| constexpr |
Predefined colour set, with green for pass and red for fail.
- Initialiser
-
= { "\033[0m", "\033[32m", "\033[31m" }
Assigned by reporters that output to a colour-capable terminal; the members are, in order, the reset, pass, and fail ANSI escape sequences.
Definition at line 171 of file expression-formatter.h.
Referenced by micro_os_plus::micro_test_plus::detail::reporter_human::reporter_human.
dependent_false_v
| constexpr |
A value that is always false, but depends on the template arguments.
Used as the condition of the static_assert of the functions that reject an argument, so that they fail only when instantiated, and their diagnostic has the message, not the concepts that were not satisfied.
- Template Parameters
-
Ts The template arguments to depend on.
Definition at line 1258 of file test.h.
Referenced by reject_suite_body and reject_test_body.
The documentation for this namespace was generated from the following files:
- check-result.h
- detail.h
- expression-formatter.h
- deprecated-inlines.h
- detail-inlines.h
- reporter-inlines.h
- test-inlines.h
- reporter.h
- test.h
- expression-formatter.cpp
- reporter.cpp
- stopwatch.cpp
- test.cpp
Generated via doxygen2docusaurus 2.2.8 by Doxygen 1.18.0.