The detail.h
File Reference
C++ header file with declarations for the µTest++ internals. More...
Included Headers
#include <stdio.h>
#include <string>
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... | |
Classes Index
struct | and_<Lhs_T, Rhs_T> |
Logical AND comparator struct template. More... | |
struct | assertion<Expr_T> |
Assertion struct template for parameter passing to the evaluator. More... | |
class | deferred_reporter<Expr_T> |
Deferred reporter class template for a specific expression. More... | |
class | deferred_reporter_base |
Base class for a deferred reporter that collects messages into a string. More... | |
struct | eq_<Lhs_T, Rhs_T> |
Equality comparator struct template. More... | |
struct | ge_<Lhs_T, Rhs_T> |
Greater than or equal comparator struct template. More... | |
struct | gt_<Lhs_T, Rhs_T> |
Greater than comparator struct template. More... | |
struct | le_<Lhs_T, Rhs_T> |
Less than or equal comparator struct template. More... | |
struct | lt_<Lhs_T, Rhs_T> |
Less than comparator struct template. More... | |
struct | ne_<Lhs_T, Rhs_T> |
Non-equality comparator struct template. More... | |
struct | not_<T> |
Logical NOT comparator struct template. More... | |
struct | nothrow_<Callable_T> |
Operator struct template to check if an expression does not throw any exception. More... | |
struct | or_<Lhs_T, Rhs_T> |
Logical OR comparator struct template. More... | |
struct | throws_<Callable_T, Exception_T> |
Operator struct template to check if an expression throws a specific exception. More... | |
struct | throws_<Callable_T, void> |
Operator struct template to check if an expression throws any exception. More... | |
Functions Index
and_ (const Lhs_T &, const Rhs_T &) -> and_< Lhs_T, Rhs_T > | |
eq_ (const Lhs_T &, const Rhs_T &) -> eq_< Lhs_T, Rhs_T > | |
ge_ (const Lhs_T &, const Rhs_T &) -> ge_< Lhs_T, Rhs_T > | |
constexpr auto | get (const T &t) |
Generic getter function template for value retrieval. More... | |
constexpr auto | get_impl (const T &t, int) -> decltype(t.get()) |
Generic getter function template for value retrieval. More... | |
constexpr auto | get_impl (const T &t,...) -> decltype(auto) |
Fallback variadic getter function template. More... | |
gt_ (const Lhs_T &, const Rhs_T &) -> gt_< Lhs_T, Rhs_T > | |
le_ (const Lhs_T &, const Rhs_T &) -> le_< Lhs_T, Rhs_T > | |
lt_ (const Lhs_T &, const Rhs_T &) -> lt_< Lhs_T, Rhs_T > | |
ne_ (const Lhs_T &, const Rhs_T &) -> ne_< Lhs_T, Rhs_T > | |
not_ (const T &) -> not_< T > | |
or_ (const Lhs_T &, const Rhs_T &) -> or_< Lhs_T, Rhs_T > | |
Description
C++ header file with declarations for the µTest++ internals.
This header provides the declarations for the internal components of the µTest++ framework, encapsulated within the micro_os_plus::micro_test_plus::detail
namespace. It defines the core mechanisms, helper structures, and utility templates that underpin the framework's assertion handling, value retrieval, comparator logic, deferred reporting, and exception checking facilities.
All definitions reside within the micro_os_plus::micro_test_plus::detail
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.
Functions
and_()
|
eq_()
|
ge_()
|
get()
| nodiscardconstexpr |
Generic getter function template for value retrieval.
- Template Parameters
T The type from which the value is to be retrieved.
- Parameters
t The object or value to be accessed.
- Returns
The value obtained via the relevant getter implementation.
The get
function template invokes the appropriate getter implementation to retrieve the value from the provided object or type. This function ensures consistent access to values for both custom and standard types within the framework.
The primary implementation attempts to invoke a get()
method if it exists, which is recommended for user-defined types to ensure consistent value access. If the type does not provide a get()
method, the fallback variadic implementation simply returns the original argument.
The get
function template delegates to these implementations, enabling seamless support for a wide range of types in test expressions and comparators.
All definitions are intended for internal use within the framework and are implemented in the include/micro-os-plus/micro-test-plus
folder to maintain a structured and modular codebase.
get_impl()
| nodiscardconstexpr |
Generic getter function template for value retrieval.
- Template Parameters
T The type from which the value is to be retrieved.
- Parameters
t The object or value to be accessed.
- Returns
The value obtained via the relevant getter implementation.
The get
function template invokes the appropriate getter implementation to retrieve the value from the provided object or type. This function ensures consistent access to values for both custom and standard types within the framework.
The primary implementation attempts to invoke a get()
method if it exists, which is recommended for user-defined types to ensure consistent value access. If the type does not provide a get()
method, the fallback variadic implementation simply returns the original argument.
The get
function template delegates to these implementations, enabling seamless support for a wide range of types in test expressions and comparators.
All definitions are intended for internal use within the framework and are implemented in the include/micro-os-plus/micro-test-plus
folder to maintain a structured and modular codebase.
get_impl()
| nodiscardconstexpr |
Fallback variadic getter function template.
- Template Parameters
T The type from which the value is to be retrieved.
- Parameters
t The object or value to be accessed.
- Returns
The original argument
t
.
The get_impl
function template serves as a fallback mechanism for value retrieval when the provided type does not implement a get()
member function. It simply returns the first argument, discarding any additional parameters.
This approach ensures that both custom types (with a get()
method) and standard types (without a get()
method) are supported seamlessly within the framework's generic getter utilities.
All definitions are intended for internal use within the framework and are implemented in the include/micro-os-plus/micro-test-plus
folder to maintain a structured and modular codebase.
gt_()
|
le_()
|
lt_()
|
ne_()
|
not_()
|
or_()
File Listing
The file content with the documentation metadata removed is:
Generated via docusaurus-plugin-doxygen by Doxygen 1.14.0.