48#ifndef MICRO_OS_PLUS_MICRO_TEST_PLUS_EXPRESSION_FORMATTER_H_
49#define MICRO_OS_PLUS_MICRO_TEST_PLUS_EXPRESSION_FORMATTER_H_
53#if defined(__cplusplus)
57#if __has_include("micro-os-plus/project-config.h")
58#include "micro-os-plus/project-config.h"
61#if __has_include("micro-os-plus/micro-test-plus-defines.h")
62#include "micro-os-plus/micro-test-plus-defines.h"
83#pragma GCC diagnostic push
85#pragma GCC diagnostic ignored "-Wpadded"
86#pragma GCC diagnostic ignored "-Waggregate-return"
88#pragma clang diagnostic ignored "-Wc++98-compat"
89#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
104#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
360#if defined(__cpp_lib_char8_t)
417#if defined(__cpp_char8_t)
534 template <
typename Po
inter_T>
558 template <
typename Char_T, std::
size_t N>
561 operator<< (
const Char_T (&s)[N]);
575 template <
character Char_T>
579#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
769 template <
typename T>
774#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
796 operator<< (
const T& t);
843 requires (std::is_enum_v<T>
844 and not std::is_convertible_v<T, std::underlying_type_t<T>>)
863 template <
class T1,
class T2>
866 operator<< (
const std::pair<T1, T2>& p);
880 template <
class... Ts>
919 template <
class Rep,
class Period>
920 requires std::is_arithmetic_v<Rep>
922 operator<< (
const std::chrono::duration<Rep, Period>& d);
940 template <
class Lhs_T,
class Rhs_T,
class Compare_T>
958 template <
class Lhs_T,
class Rhs_T,
class Epsilon_T>
974 template <
class Lhs_T,
class Rhs_T>
990 template <
class Lhs_T,
class Rhs_T>
1022 template <
class T,
class Predicate_T>
1026#if defined(__cpp_exceptions)
1041 template <
class Exception_T>
1075 [[nodiscard]]
const std::string&
1076 str (
void)
const noexcept;
1078#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
1097 [[deprecated (
"use str().c_str() (since 6.0.0)"), nodiscard]]
const char*
1098 c_str (
void)
const noexcept;
1111 [[deprecated (
"use str().empty() (since 6.0.0)"), nodiscard]]
bool
1112 empty (
void)
const noexcept;
1187#if defined(__cpp_lib_char8_t)
1283 [[nodiscard]]
const std::string&
1284 check_text (
const void* owner)
const noexcept;
1306 colour (
const bool cond)
const;
1466 template <
class Tuple_T, std::size_t... Is>
1490 template <
class Lhs_T,
class Rhs_T>
1494#if defined(__cpp_exceptions)
1538 template <
class Lhs_T,
class Rhs_T>
1566 template <
class Lhs_T,
class Rhs_T>
1607 template <
class Lhs_T,
class Rhs_T,
class Compare_T>
1627 template <
class Lhs_T,
class Rhs_T,
class Epsilon_T>
1671 std::vector<std::pair<const void*, std::string>>
pending_{};
1745 formatter.operator<< (
value);
1769 operator<< (formatter,
value);
1829#if defined(__GNUC__)
1830#pragma GCC diagnostic pop
The result of one check, reported when destroyed.
Concept satisfied by the pointers to the character types.
Concept satisfied by the character types.
Concept satisfied by the types that have a free operator<< for the formatter.
Concept satisfied by the types that the formatter writes with one of its own member functions operato...
Concept satisfied when a type is a framework expression type.
Concept satisfied when a type can be appended to the message of a check result via operator<<.
C++ header file with declarations for the µTest++ internals.
C++ header file with declarations for the µTest++ extension concepts.
detail::expression_formatter expression_formatter
Public name of the formatter used to report operand values.
Internal implementation details for the µTest++ framework.
void append_control_escape(std::string &text, char c)
Appends the escape sequence of a control character.
constexpr colours colours_none
Predefined colour set, without escape sequences.
constexpr colours colours_red_green
Predefined colour set, with green for pass and red for fail.
Primary namespace for the µTest++ testing framework.
Logical AND comparator struct template.
Approximate comparator struct template.
A C string operand of a comparator.
Common base struct for callable-wrapping operators.
Colours used to highlight pass and fail results in test reports.
const char * none
Terminal colour reset sequence.
const char * fail
Terminal colour sequence for failing tests.
const char * pass
Terminal colour sequence for passing tests.
Relational comparator struct template.
Struct representing a named boolean constant, created by the _b literal.
Logical NOT comparator struct template.
Operator struct to check if an expression does not throw any exception.
Empty base struct for the framework expression types.
Logical OR comparator struct template.
Writes values as text, as the messages of the checks are written.
static void append(std::string &text, const T &value)
Appends a value to a text, in the plain mode of the formatter.
Unary predicate struct template.
Operator struct template to check if an expression throws a specific exception.
Struct template representing a generic value, accessible via a getter.