The test-reporter.h
File Reference
C++ header file with declarations for the µTest++ test reporter. More...
Included Headers
#include <string_view>
#include <string>
#include "type-traits.h"
#include "test-suite.h"
#include "detail.h"
Namespaces Index
namespace | micro_os_plus |
The primary namespace for the µOS++ framework. More... | |
namespace | micro_os_plus::micro_test_plus |
Primary namespace for the µTest++ testing framework. More... | |
Classes Index
struct | colors |
Colours used to highlight pass and fail results in test reports. More... | |
class | test_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... | |
Typedefs Index
using | verbosity_t = verbosity |
Type alias for the verbosity enumeration used in test reporting. More... | |
Functions Index
test_reporter & | endl (test_reporter &stream) |
Output stream manipulator for ending a line in test reports. 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 127 of file test-reporter.h.
Typedefs
verbosity_t
|
Type alias for the verbosity enumeration used in test reporting.
The verbosity_t
type alias provides a convenient shorthand for referring to the verbosity
enumeration, which defines the available levels of detail for test output within the reporting system.
Using this alias improves code readability and consistency throughout the framework, especially when specifying or configuring verbosity levels for test reporters.
Definition at line 148 of file test-reporter.h.
Functions
endl()
|
Output stream manipulator for ending a line in test reports.
- Parameters
stream Reference to the test_reporter
instance.
- Returns
Reference to the same
test_reporter
instance, enabling chaining of output operations.
The endl
function inserts a newline character into the specified test_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 73 of file test-reporter.cpp.
File Listing
The file content with the documentation metadata removed is:
Generated via docusaurus-plugin-doxygen by Doxygen 1.14.0.