expression-formatter.h File
C++ header file with declarations for the µTest++ expression formatter. More...
Included Headers
Namespaces Index
| namespace | micro_os_plus |
|
The primary namespace for the µOS++ framework. More... | |
| namespace | micro_test_plus |
|
Primary namespace for the µTest++ testing framework. More... | |
| namespace | detail |
|
Internal implementation details for the µTest++ framework. More... | |
Classes Index
| struct | colours |
|
Colours used to highlight pass and fail results in test reports. More... | |
| class | expression_formatter |
|
Formats values and expressions into an owned string buffer. More... | |
Variables Index
| constexpr colours | colours_red_green = ... |
Description
C++ header file with declarations for the µTest++ expression formatter.
This header provides the expression_formatter class, which encapsulates all value-formatting logic used by the µTest++ framework. The class owns a std::string buffer and exposes operator<< overloads for every standard arithmetic type, character type, string, pointer, container, and framework expression type derived from detail::op.
By consolidating the formatting operators and their shared append_number_ helper into a single class, the reporter is relieved of those responsibilities, and detail::deferred_reporter can pre-format expression text at construction time without requiring reporter or subtest to be complete at that point.
Colour-code processing is intentionally excluded from this class; it remains the responsibility of the owning reporter.
All definitions reside within the micro_os_plus::micro_test_plus namespace, ensuring clear separation from user code and minimising the risk of naming conflicts.
This file is intended solely for internal use within the framework and should not be included directly by user code.
Variables
colours_red_green
| constexpr |
- Initialiser
-
= { "\033[0m", "\033[32m", "\033[31m" }
Definition at line 123 of file expression-formatter.h.
Referenced by micro_os_plus::micro_test_plus::reporter_human::reporter_human.
File Listing
The file content with the documentation metadata removed is:
Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.