reporter.h File
C++ header file with declarations for the µTest++ test reporter. 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 | indent_t |
|
Parameterised stream manipulator for outputting indentation. More... | |
| class | reporter |
|
Reporter to display test results, including operand values and types for failures. More... | |
Enumerations Index
| enum class | verbosity { ... } |
|
The verbosity levels for test reporting. More... | |
Functions Index
| reporter & | endl (reporter &stream) |
|
Output stream manipulator for ending a line in test reports. More... | |
| detail::indent_t | indent (size_t level) |
|
Factory function that creates an indent_t manipulator. More... | |
Description
C++ header file with declarations for the µTest++ test reporter.
This header provides the declarations for the test reporting facilities used within the µTest++ framework. It defines the interfaces for formatting and outputting test results, including operator overloads for a wide range of value types, containers, and comparison expressions, as well as structured output for logical and exception-related assertions.
The test reporter is responsible for presenting test outcomes in a clear, consistent, and expressive manner, supporting both value and pointer semantics, and providing detailed diagnostics for both successful and failed test cases. Special attention is given to formatting, colour highlighting, and extensibility, enabling professional and readable test reports suitable for embedded and general C++ development.
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.
The header files are organised within the include/micro-os-plus/micro-test-plus folder to maintain a structured and modular codebase.
This file is intended solely for internal use within the framework and should not be included directly by user code.
Enumerations
verbosity
| strong |
The verbosity levels for test reporting.
The verbosity enumeration defines the available levels of detail for test output produced by the reporting system. These levels control the amount and type of information displayed during test execution, allowing users to tailor the output to their specific requirements.
Selecting an appropriate verbosity level enhances the usability of test reports, whether for concise summaries or comprehensive diagnostics.
Definition at line 101 of file reporter.h.
Functions
endl()
|
Output stream manipulator for ending a line in test reports.
- Parameters
-
stream Reference to the reporter instance.
- Returns
Reference to the same reporter instance, enabling chaining of output operations.
The endl function inserts a newline character into the specified reporter stream and flushes its output buffer. This operation ensures that each test output line is clearly separated and immediately visible, facilitating the readability and clarity of test results across all test cases and folders within the µTest++ framework.
Definition at line 206 of file reporter.cpp.
Referenced by micro_os_plus::micro_test_plus::reporter_tap::output_fail_prefix_, micro_os_plus::micro_test_plus::reporter_human::output_fail_suffix_, micro_os_plus::micro_test_plus::reporter_tap::output_fail_suffix_, micro_os_plus::micro_test_plus::reporter_human::output_pass_suffix_ and micro_os_plus::micro_test_plus::reporter_tap::output_pass_suffix_.
indent()
| inline nodiscard |
Factory function that creates an indent_t manipulator.
- Parameters
-
level The number of four-space indentation levels.
- Returns
An indent_t value for use with operator<<.
Definition at line 79 of file reporter-inlines.h.
Referenced by micro_os_plus::micro_test_plus::reporter_human::begin_subtest, micro_os_plus::micro_test_plus::reporter_tap::begin_subtest, micro_os_plus::micro_test_plus::reporter_human::end_subtest, micro_os_plus::micro_test_plus::reporter_tap::end_subtest, micro_os_plus::micro_test_plus::reporter_human::end_suite, micro_os_plus::micro_test_plus::reporter_tap::end_suite, micro_os_plus::micro_test_plus::reporter_human::output_fail_prefix_, micro_os_plus::micro_test_plus::reporter_tap::output_fail_prefix_, micro_os_plus::micro_test_plus::reporter_tap::output_fail_suffix_, micro_os_plus::micro_test_plus::reporter_human::output_pass_prefix_ and micro_os_plus::micro_test_plus::reporter_tap::output_pass_prefix_.
File Listing
The file content with the documentation metadata removed is:
Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.