micro-test-plus 3.2.2
µTest++ Testing Framework
Loading...
Searching...
No Matches
reflection.h File Reference

C++ header file with declarations for the µTest++ reflection utilities. More...

#include <string_view>

Go to the source code of this file.

Classes

class  micro_os_plus::micro_test_plus::reflection::source_location
 Local implementation of source location information for diagnostics. More...

Namespaces

namespace  micro_os_plus
 The primary namespace for the µOS++ framework.
namespace  micro_os_plus::micro_test_plus
 Primary namespace for the µTest++ testing framework.
namespace  micro_os_plus::micro_test_plus::reflection
 Reflection utilities for the µTest++ testing framework.

Functions

const char * micro_os_plus::micro_test_plus::reflection::short_name (const char *name)
 Extract a short type or function name from a fully qualified name.
template<class T>
constexpr auto micro_os_plus::micro_test_plus::reflection::type_name (void) -> std::string_view
 Extract the type name from the __PRETTY_FUNCTION__ macro.

Detailed Description

This header provides the declarations for the reflection utilities used within the µTest++ framework. It defines interfaces for obtaining source location information and extracting type names at compile time, supporting advanced diagnostics and reporting capabilities.

The reflection utilities include a local implementation of source_location for environments lacking C++20 standard support, as well as functions for extracting concise type names using compiler-specific macros such as __PRETTY_FUNCTION__. These facilities enable precise identification of code locations and types in test reports, enhancing the clarity and professionalism of diagnostic output.

All definitions reside within the micro_os_plus::micro_test_plus::reflection 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.

Definition in file reflection.h.