Skip to main content

micro_test_plus Namespace

Primary namespace for the µTest++ testing framework. More...

Definition

namespace micro_os_plus::micro_test_plus { ... }

Namespaces Index

namespacedetail

Internal implementation details for the µTest++ framework. More...

namespaceliterals

User-defined literals and type wrappers for the µTest++ testing framework. More...

namespacemath

Mathematical utilities for the µTest++ testing framework. More...

namespaceoperators

Custom operator overloads for expressive and type-safe test assertions. More...

namespacereflection

Reflection utilities for the µTest++ testing framework. More...

namespacetype_traits

Type trait utilities and metaprogramming support for the µTest++ testing framework. More...

namespaceutility

Utility functions for the µTest++ testing framework. More...

Classes Index

struct_t<T>

Deprecated generic strongly-typed wrapper for explicit type conversion. More...

classreporter

Reporter to display test results, including operand values and types for failures. More...

classreporter_human

Human (standard output) implementation of reporter. More...

classreporter_tap

TAP (Test Anything Protocol) implementation of reporter. More...

classrunner

The test runner for the µTest++ framework. More...

classstatic_runner

A runner variant that also manages statically-registered test suites. More...

classstatic_suite

A test suite designed for static (namespace-scope) registration with a static_runner. More...

classsubtest

A named, runnable test case that lives inside a suite. More...

classsuite

A named, runnable test suite registered with the test runner. More...

structto_t<T>

Generic strongly-typed wrapper for explicit type conversion. More...

classtop_suite

The implicit top-level suite owned by every runner instance. More...

Enumerations Index

enum classverbosity { ... }

The verbosity levels for test reporting. More...

Functions Index

reporter &endl (reporter &stream)

Output stream manipulator for ending a line in test reports. More...

detail::indent_tindent (size_t level)

Factory function that creates an indent_t manipulator. More...

template <class Lhs_T, class Rhs_T>
constexpr auto_and (const Lhs_T &lhs, const Rhs_T &rhs)

Generic logical and operation. More...

template <class Expr_T>
constexpr auto_not (const Expr_T &expr)

Generic logical not operation. More...

template <class Lhs_T, class Rhs_T>
constexpr auto_or (const Lhs_T &lhs, const Rhs_T &rhs)

Generic logical or operation. More...

template <class Lhs_T, class Rhs_T>
constexpr autoeq (const Lhs_T &lhs, const Rhs_T &rhs)

Generic equality comparator for non-pointer types. More...

template <class Lhs_T, class Rhs_T>
constexpr autoeq (Lhs_T *lhs, Rhs_T *rhs)

Pointer equality comparator for any pointer types. More...

template <class Lhs_T, class Rhs_T>
constexpr autoge (const Lhs_T &lhs, const Rhs_T &rhs)

Generic greater than or equal comparator. More...

template <class Lhs_T, class Rhs_T>
constexpr autoge (Lhs_T *lhs, Rhs_T *rhs)

Pointer greater than or equal comparator. More...

template <class Lhs_T, class Rhs_T>
constexpr autogt (const Lhs_T &lhs, const Rhs_T &rhs)

Generic greater than comparator. More...

template <class Lhs_T, class Rhs_T>
constexpr autogt (Lhs_T *lhs, Rhs_T *rhs)

Pointer greater than comparator. More...

template <class Lhs_T, class Rhs_T>
constexpr autole (const Lhs_T &lhs, const Rhs_T &rhs)

Generic less than or equal comparator. More...

template <class Lhs_T, class Rhs_T>
constexpr autole (Lhs_T *lhs, Rhs_T *rhs)

Pointer less than or equal comparator. More...

template <class Lhs_T, class Rhs_T>
constexpr autolt (const Lhs_T &lhs, const Rhs_T &rhs)

Generic less than comparator. More...

template <class Lhs_T, class Rhs_T>
constexpr autolt (Lhs_T *lhs, Rhs_T *rhs)

Pointer less than comparator. More...

template <class T>
constexpr T &mut (const T &t) noexcept

Generic mutator to remove const qualification from any type. More...

template <class Lhs_T, class Rhs_T>
constexpr autone (const Lhs_T &lhs, const Rhs_T &rhs)

Generic non-equality comparator. More...

template <class Lhs_T, class Rhs_T>
constexpr autone (Lhs_T *lhs, Rhs_T *rhs)

Pointer non-equality comparator. More...

template <class Callable_T>
constexpr autonothrow (const Callable_T &func)

Check if a callable does not throw an exception. More...

template <class Callable_T>
constexpr autothrows (const Callable_T &func)

Check if a callable throws an exception (any exception). More...

template <class Exception_T, class Callable_T>
constexpr autothrows (const Callable_T &func)

Check if a callable throws a specific exception. More...

Variables Index

constexpr size_tindent_size = 4

Number of spaces per indentation level. More...

Deprecated Type Wrappers Index

using_b = type_traits::value< bool >

Strongly-typed wrapper for bool values. More...

using_c = type_traits::value< char >

Strongly-typed wrapper for char values. More...

using_sc = type_traits::value< signed char >

Strongly-typed wrapper for signed char values. More...

using_s = type_traits::value< short >

Strongly-typed wrapper for short values. More...

using_i = type_traits::value< int >

Strongly-typed wrapper for int values. More...

using_l = type_traits::value< long >

Strongly-typed wrapper for long values. More...

using_ll = type_traits::value< long long >

Strongly-typed wrapper for long long values. More...

using_u = type_traits::value< unsigned >

Strongly-typed wrapper for unsigned values. More...

using_uc = type_traits::value< unsigned char >

Strongly-typed wrapper for unsigned char values. More...

using_us = type_traits::value< unsigned short >

Strongly-typed wrapper for unsigned short values. More...

using_ul = type_traits::value< unsigned long >

Strongly-typed wrapper for unsigned long values. More...

using_ull = type_traits::value< unsigned long long >

Strongly-typed wrapper for unsigned long long values. More...

using_i8 = type_traits::value< std::int8_t >

Strongly-typed wrapper for std::int8_t values. More...

using_i16 = type_traits::value< std::int16_t >

Strongly-typed wrapper for std::int16_t values. More...

using_i32 = type_traits::value< std::int32_t >

Strongly-typed wrapper for std::int32_t values. More...

using_i64 = type_traits::value< std::int64_t >

Strongly-typed wrapper for std::int64_t values. More...

using_u8 = type_traits::value< std::uint8_t >

Strongly-typed wrapper for std::uint8_t values. More...

using_u16 = type_traits::value< std::uint16_t >

Strongly-typed wrapper for std::uint16_t values. More...

using_u32 = type_traits::value< std::uint32_t >

Strongly-typed wrapper for std::uint32_t values. More...

using_u64 = type_traits::value< std::uint64_t >

Strongly-typed wrapper for std::uint64_t values. More...

using_f = type_traits::value< float >

Strongly-typed wrapper for float values. More...

using_d = type_traits::value< double >

Strongly-typed wrapper for double values. More...

using_ld = type_traits::value< long double >

Strongly-typed wrapper for long double values. More...

Type Wrappers Index

usingto_b = type_traits::value< bool >

Strongly-typed wrapper for bool values. More...

usingto_c = type_traits::value< char >

Strongly-typed wrapper for char values. More...

usingto_sc = type_traits::value< signed char >

Strongly-typed wrapper for signed char values. More...

usingto_s = type_traits::value< short >

Strongly-typed wrapper for short values. More...

usingto_i = type_traits::value< int >

Strongly-typed wrapper for int values. More...

usingto_l = type_traits::value< long >

Strongly-typed wrapper for long values. More...

usingto_ll = type_traits::value< long long >

Strongly-typed wrapper for long long values. More...

usingto_u = type_traits::value< unsigned >

Strongly-typed wrapper for unsigned values. More...

usingto_uc = type_traits::value< unsigned char >

Strongly-typed wrapper for unsigned char values. More...

usingto_us = type_traits::value< unsigned short >

Strongly-typed wrapper for unsigned short values. More...

usingto_ul = type_traits::value< unsigned long >

Strongly-typed wrapper for unsigned long values. More...

usingto_ull = type_traits::value< unsigned long long >

Strongly-typed wrapper for unsigned long long values. More...

usingto_i8 = type_traits::value< std::int8_t >

Strongly-typed wrapper for std::int8_t values. More...

usingto_i16 = type_traits::value< std::int16_t >

Strongly-typed wrapper for std::int16_t values. More...

usingto_i32 = type_traits::value< std::int32_t >

Strongly-typed wrapper for std::int32_t values. More...

usingto_i64 = type_traits::value< std::int64_t >

Strongly-typed wrapper for std::int64_t values. More...

usingto_u8 = type_traits::value< std::uint8_t >

Strongly-typed wrapper for std::uint8_t values. More...

usingto_u16 = type_traits::value< std::uint16_t >

Strongly-typed wrapper for std::uint16_t values. More...

usingto_u32 = type_traits::value< std::uint32_t >

Strongly-typed wrapper for std::uint32_t values. More...

usingto_u64 = type_traits::value< std::uint64_t >

Strongly-typed wrapper for std::uint64_t values. More...

usingto_f = type_traits::value< float >

Strongly-typed wrapper for float values. More...

usingto_d = type_traits::value< double >

Strongly-typed wrapper for double values. More...

usingto_ld = type_traits::value< long double >

Strongly-typed wrapper for long double values. More...

Description

Primary namespace for the µTest++ testing framework.

The micro_os_plus::micro_test_plus namespace encapsulates all core components, types, and utilities of the µTest++ testing framework, providing a dedicated scope for its public API.

This namespace is structured into several nested namespaces, each responsible for a specific aspect of the framework, such as mathematical utilities, type traits, literals, test suite and test case management, test runners, test reporters, internal details, operators, and utility functions.

By grouping all definitions within this namespace and its sub-namespaces, the framework achieves clear code organisation, minimises naming conflicts, and enhances maintainability. This modular structure supports robust, scalable, and professional test development for both embedded and general C++ projects.

All public API definitions are implemented in the include/micro-os-plus folder, ensuring a clear separation from user code and facilitating straightforward integration with the wider µOS++ ecosystem.

Enumerations

verbosity

enum class micro_os_plus::micro_test_plus::verbosity
strong

The verbosity levels for test reporting.

Enumeration values
silent (= 0)
quiet (= 1)
normal (= 2)
verbose (= 3)

The verbosity enumeration defines the available levels of detail for test output produced by the reporting system. These levels control the amount and type of information displayed during test execution, allowing users to tailor the output to their specific requirements.

Selecting an appropriate verbosity level enhances the usability of test reports, whether for concise summaries or comprehensive diagnostics.

Definition at line 101 of file reporter.h.

102 {
103 silent = 0,
104 quiet = 1,
105 normal = 2,
108 };

Functions

endl()

reporter & micro_os_plus::micro_test_plus::endl (reporter & stream)

Output stream manipulator for ending a line in test reports.

Parameters
stream

Reference to the reporter instance.

Returns

Reference to the same reporter instance, enabling chaining of output operations.

The endl function inserts a newline character into the specified reporter stream and flushes its output buffer. This operation ensures that each test output line is clearly separated and immediately visible, facilitating the readability and clarity of test results across all test cases and folders within the µTest++ framework.

Definition at line 206 of file reporter.cpp.

206 endl (reporter& stream)
207 {
208 stream.endline ();
209 return stream;
210 }

Referenced by micro_os_plus::micro_test_plus::reporter_tap::output_fail_prefix_, micro_os_plus::micro_test_plus::reporter_human::output_fail_suffix_, micro_os_plus::micro_test_plus::reporter_tap::output_fail_suffix_, micro_os_plus::micro_test_plus::reporter_human::output_pass_suffix_ and micro_os_plus::micro_test_plus::reporter_tap::output_pass_suffix_.

indent()


The documentation for this namespace was generated from the following files:


Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.