detail.h File
C++ header file with declarations for the µTest++ internals. 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 | 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... | |
| struct | binary_op_<Lhs_T, Rhs_T> |
|
Common base struct template for binary comparators. More... | |
| struct | callable_op_ |
|
Common base struct for callable-wrapping operators. 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... | |
| struct | unary_op_<T> |
|
Common base struct template for unary comparators. More... | |
Functions Index
template <typename Lhs_T, typename Rhs_T> | |
| and_ (const Lhs_T &, const Rhs_T &) -> and_< Lhs_T, Rhs_T > | |
template <class T> | |
| void | append_number_ (std::string &buffer, T v) |
|
Appends the string representation of a numeric value to a buffer, using std::to_chars for allocation-free, locale-independent formatting. More... | |
template <typename Lhs_T, typename Rhs_T> | |
| eq_ (const Lhs_T &, const Rhs_T &) -> eq_< Lhs_T, Rhs_T > | |
template <typename Lhs_T, typename Rhs_T> | |
| ge_ (const Lhs_T &, const Rhs_T &) -> ge_< Lhs_T, Rhs_T > | |
template <class T> | |
| constexpr auto | get (const T &t) |
|
Generic getter function template for value retrieval. More... | |
template <typename Lhs_T, typename Rhs_T> | |
| gt_ (const Lhs_T &, const Rhs_T &) -> gt_< Lhs_T, Rhs_T > | |
template <typename Lhs_T, typename Rhs_T> | |
| le_ (const Lhs_T &, const Rhs_T &) -> le_< Lhs_T, Rhs_T > | |
template <typename Lhs_T, typename Rhs_T> | |
| lt_ (const Lhs_T &, const Rhs_T &) -> lt_< Lhs_T, Rhs_T > | |
template <typename Lhs_T, typename Rhs_T> | |
| ne_ (const Lhs_T &, const Rhs_T &) -> ne_< Lhs_T, Rhs_T > | |
template <typename T> | |
| not_ (const T &) -> not_< T > | |
template <typename Lhs_T, typename Rhs_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_()
|
append_number_()
|
Appends the string representation of a numeric value to a buffer, using std::to_chars for allocation-free, locale-independent formatting.
- Template Parameters
-
T The numeric type to format.
- Parameters
-
buffer The string to append to.
v The value to format.
- Returns
Nothing.
For long double, a platform-specific path is chosen:
- On Windows and on platforms where long double has the same storage width as double (e.g., ARM, RISC-V), the value is cast to double and formatted with std::to_chars.
- On x86-64 Linux/macOS with 80-bit extended precision, snprintf with Lg is used as a portable fallback because std::to_chars for long double may be unavailable when linking with lld.
For all other numeric types, std::to_chars is called directly, providing locale-independent, allocation-free formatting.
Definition at line 653 of file detail-inlines.h.
Referenced by micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<<, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<< and micro_os_plus::micro_test_plus::reporter::operator<<.
eq_()
|
ge_()
|
get()
| nodiscard constexpr |
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.
If the type T provides a get() member function, it is invoked and its result returned. Otherwise the argument itself is returned unchanged. The selection is performed at compile time via if constexpr with an inline requires expression.
Definition at line 81 of file detail-inlines.h.
Referenced by micro_os_plus::micro_test_plus::detail::eq_< Lhs_T, Rhs_T >::eq_, micro_os_plus::micro_test_plus::detail::ge_< Lhs_T, Rhs_T >::ge_, micro_os_plus::micro_test_plus::detail::gt_< Lhs_T, Rhs_T >::gt_, micro_os_plus::micro_test_plus::detail::le_< Lhs_T, Rhs_T >::le_, micro_os_plus::micro_test_plus::detail::lt_< Lhs_T, Rhs_T >::lt_, micro_os_plus::micro_test_plus::detail::ne_< Lhs_T, Rhs_T >::ne_, micro_os_plus::micro_test_plus::detail::binary_op_< Lhs_T, Rhs_T >::lhs, micro_os_plus::micro_test_plus::detail::unary_op_< T >::operand, micro_os_plus::micro_test_plus::detail::expression_formatter::operator<< and micro_os_plus::micro_test_plus::detail::binary_op_< Lhs_T, Rhs_T >::rhs.
gt_()
|
le_()
|
lt_()
|
ne_()
|
not_()
|
or_()
File Listing
The file content with the documentation metadata removed is:
Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.