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

C++ header file with inline implementations for the µTest++ literals and type wrappers. More...

#include <cstdint>

Go to the source code of this file.

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::literals
 User-defined literals and type wrappers for the µTest++ testing framework.

Functions

constexpr auto micro_os_plus::micro_test_plus::literals::operator""_b (const char *name, decltype(sizeof("")) size)
 User-defined literal operator to convert to bool.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_c ()
 User-defined literal operator to convert to char.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_d ()
 User-defined literal operator to convert to double.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_f ()
 User-defined literal operator to convert to float.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_i ()
 User-defined literal operator to convert to int.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_i16 ()
 User-defined literal operator to convert to int16_t.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_i32 ()
 User-defined literal operator to convert to int32_t.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_i64 ()
 User-defined literal operator to convert to int64_t.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_i8 ()
 User-defined literal operator to convert to int8_t.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_l ()
 User-defined literal operator to convert to long.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_ld ()
 User-defined literal operator to convert to long double.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_ll ()
 User-defined literal operator to convert to long long.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_s ()
 User-defined literal operator to convert to short.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_sc ()
 User-defined literal operator to convert to signed char.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_u ()
 User-defined literal operator to convert to unsigned.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_u16 ()
 User-defined literal operator to convert to uint16_t.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_u32 ()
 User-defined literal operator to convert to uint32_t.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_u64 ()
 User-defined literal operator to convert to uint64_t.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_u8 ()
 User-defined literal operator to convert to uint8_t.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_uc ()
 User-defined literal operator to convert to unsigned char.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_ul ()
 User-defined literal operator to convert to unsigned long.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_ull ()
 User-defined literal operator to convert to unsigned long long.
template<char... Cs>
constexpr auto micro_os_plus::micro_test_plus::literals::operator""_us ()
 User-defined literal operator to convert to unsigned short.

Detailed Description

This header provides the inline implementations for the user-defined literal operators and type wrappers used within the µTest++ framework. It defines the logic for generating strongly-typed integral, floating-point, and boolean constants at compile time, enabling expressive and type-safe test expressions.

The implemented literal operators support a wide range of C++ fundamental types, allowing constants to be suffixed with type-specific identifiers (such as _i, _u16, _f, _d, _b, etc.) to produce values that integrate seamlessly with the µTest++ comparators and reporting mechanisms.

Specialised wrappers are provided for named boolean literals, supporting enhanced expressiveness and type safety in test conditions.

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