The micro-test-plus.cpp
File Reference
C++ source file with implementations for the µTest++ methods. More...
Included Headers
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... | |
namespace | micro_os_plus::micro_test_plus::detail |
Internal implementation details for the µTest++ framework. More... | |
namespace | micro_os_plus::micro_test_plus::reflection |
Reflection utilities for the µTest++ testing framework. More... | |
namespace | micro_os_plus::micro_test_plus::utility |
Utility functions for the µTest++ testing framework. More... | |
Functions Index
int | exit_code (void) |
Complete the test run and return the exit code. More... | |
void | initialize (int argc, char *argv[], const char *name="Main") |
Initialise the µTest++ framework. More... | |
bool | is_match (std::string_view input, std::string_view pattern) |
Check if a string matches a pattern. More... | |
const char * | short_name (const char *name) |
Extract a short type or function name from a fully qualified name. More... | |
Description
C++ source file with implementations for the µTest++ methods.
This source file contains the core implementations for the µTest++ testing framework, including initialisation and shutdown routines, utility functions, and the management of global framework state. It provides the logic for setting up the test environment, registering and executing test suites, reporting results, and supporting utility operations such as file name extraction and pattern-based string matching.
All definitions are contained within the micro_os_plus::micro_test_plus
namespace and its nested namespaces, ensuring clear separation from user code and minimising the risk of naming conflicts.
The implementation is optimised for embedded environments, avoiding heavy dependencies and providing lightweight, efficient mechanisms for test execution and reporting.
This file must be included when building the µTest++ library.
Functions
short_name()
|
Extract a short type or function name from a fully qualified name.
- Parameters
name The fully qualified name as a C-string.
- Returns
A pointer to the short name within the input string.
This function extracts the short name from a given file path by locating the final folder separator ('/'). If a separator is found, it returns a pointer to the character immediately following it, effectively providing the file or folder name. If no separator is present, the original input string is returned. This utility is useful for reporting concise file or folder names in test output.
Definition at line 128 of file micro-test-plus.cpp.
File Listing
The file content with the documentation metadata removed is:
Generated via docusaurus-plugin-doxygen by Doxygen 1.14.0.