Skip to main content

micro-test-plus.h File

Main C++ header with the declarations for the µTest++ Testing Framework. More...

Included Headers

Namespaces Index

namespacemicro_test_plus

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

Description

Main C++ header with the declarations for the µTest++ Testing Framework.

This header serves as the principal entry point for the µTest++ testing framework, purpose-built for both embedded and general C++ projects.

It provides all essential declarations required to write and manage tests, including test runner and reporter objects, test suite and test case management, expectations, assumptions, comparators, logical operators, exception verification, and utility functions.

The header also incorporates all necessary dependencies and internal headers to ensure the framework operates correctly and efficiently.

All public API definitions reside within the micro_os_plus::micro_test_plus namespace and its nested namespaces, ensuring clear separation from user code and minimising the risk of naming conflicts.

This file is located in the top-level include/micro-os-plus directory; all other header files are organised within the include/micro-os-plus/micro-test-plus directory to maintain a structured and modular codebase.

To access the complete functionality of the µTest++ framework, users should include this header in their test projects.

The implementation is significantly inspired by Boost UT, with adaptations and extensions to address the requirements of embedded development and the µTest++ framework.

File Listing

The file content with the documentation metadata removed is:

1/*
2 * This file is part of the µOS++ project (https://micro-os-plus.github.io/).
3 * Copyright (c) 2021-2026 Liviu Ionescu. All rights reserved.
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose is hereby granted, under the terms of the MIT license.
7 *
8 * If a copy of the license was not distributed with this file, it can be
9 * obtained from https://opensource.org/licenses/mit.
10 *
11 * Major parts of the code are inspired from v1.1.8 of the Boost UT project,
12 * released under the terms of the Boost Version 1 Software License,
13 * which can be obtained from https://www.boost.org/LICENSE_1_0.txt.
14 */
15
16// ----------------------------------------------------------------------------
17
52
53#ifndef MICRO_TEST_PLUS_MICRO_TEST_PLUS_H_
54#define MICRO_TEST_PLUS_MICRO_TEST_PLUS_H_
55
56// ----------------------------------------------------------------------------
57
58#ifdef __cplusplus
59
60// ----------------------------------------------------------------------------
61
62#if defined(MICRO_OS_PLUS_INCLUDE_CONFIG_H)
63#include <micro-os-plus/config.h>
64#endif // MICRO_OS_PLUS_INCLUDE_CONFIG_H
65
66// No deps.
68
69// Requires math.h.
71
72// No deps.
74
75// Requires type-traits.h, reflection.h.
77
78// Requires type-traits.h, math.h.
80
81// No deps.
83
84// No deps.
86
87// Requires type-traits.h + detail.h,
89
90// Requires type-traits.h, detail.h + reflection.h.
92
93// Requires type-traits.h, detail.h, expression-formatter.h, reflection.h.
95
96// Requires type-traits.h, reflection.h, expression-formatter.h.
98
99// No deps.
101
102// Requires reporter.h, reflection.h.
104
105// Requires reporter.h, reflection.h.
107
108// No deps.
110
111// Requires reporter.h, runner-totals.h, reflection.h, type-traits.h and
112// timings.h + deferred-reporter.h, reporter.h.
114
115// Requires timings.h, test.h (detail::test_node, top_suite), reflection.h.
117
118// ----------------------------------------------------------------------------
119
144
145// ----------------------------------------------------------------------------
146
147#endif // __cplusplus
148
149// ----------------------------------------------------------------------------
150
151#endif // MICRO_TEST_PLUS_MICRO_TEST_PLUS_H_
152
153// ----------------------------------------------------------------------------

Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.