C++ source file with implementations for the µTest++ test suite methods. More...
Namespaces Index
Description
C++ source file with implementations for the µTest++ test suite methods.
This source file contains the core implementations for the test suite facilities of the µTest++ framework. It provides the logic for constructing, registering, and managing test suites and their associated test cases. The implementation covers initialisation and clean-up routines, execution of test suites and test cases, tracking of successful and failed checks, and integration with the test reporter for structured output.
The design ensures that test suites are non-copyable and non-movable, maintaining unique ownership and consistent state. Flexible support for callable objects enables a wide range of test suite definitions, facilitating expressive and maintainable test organisation across embedded and general C++ projects.
All definitions reside within the micro_os_plus::micro_test_plus namespace, ensuring clear separation from user code and minimising the risk of naming conflicts.
This file must be included when building the µTest++ library.
File Listing
The file content with the documentation metadata removed is:
46#if __has_include(<micro-os-plus/project-config.h>)
47#include <micro-os-plus/project-config.h>
48#elif __has_include(<micro-os-plus/config.h>)
50 "micro-os-plus/config.h is deprecated, rename to micro-os-plus/project-config.h and include it instead of micro-os-plus/config.h"
51#include <micro-os-plus/config.h>
54#if __has_include(<micro-os-plus/micro-test-plus-defines.h>)
55#include <micro-os-plus/micro-test-plus-defines.h>
58#include <micro-os-plus/diag/trace.h>
67#pragma clang diagnostic ignored "-Wunknown-warning-option"
68#pragma clang diagnostic ignored "-Wc++98-compat"
69#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
71#pragma GCC diagnostic ignored "-Wredundant-tags"
72#pragma GCC diagnostic ignored "-Wsuggest-final-types"
73#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
93#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
95#pragma GCC diagnostic push
97#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
100 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name);
102#pragma GCC diagnostic pop
115#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
117#pragma GCC diagnostic push
118#if defined(__clang__)
119#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
122 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
124#pragma GCC diagnostic pop
145#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
147#pragma GCC diagnostic push
148#if defined(__clang__)
149#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
152 trace::printf ("%s '%s' %zu\n", __PRETTY_FUNCTION__, name, own_index_);
154#pragma GCC diagnostic pop
168#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
170#pragma GCC diagnostic push
171#if defined(__clang__)
172#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
175 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
177#pragma GCC diagnostic pop
219 std::unique_ptr<class subtest> child_test, suite& suite)
229#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
231#pragma GCC diagnostic push
232#if defined(__clang__)
233#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
236 trace::printf ("%s subtest '%s' executed one more subtest\n",
237 __PRETTY_FUNCTION__, name ());
239#pragma GCC diagnostic pop
246#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
248#pragma GCC diagnostic push
249#if defined(__clang__)
250#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
253 trace::printf ("%s suite '%s' totals\n", __PRETTY_FUNCTION__,
256#pragma GCC diagnostic pop
278#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
280#pragma GCC diagnostic push
281#if defined(__clang__)
282#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
285 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
287#pragma GCC diagnostic pop
300#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED)
302#pragma GCC diagnostic push
303#if defined(__clang__)
304#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
307 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
309#pragma GCC diagnostic pop
337#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
339#pragma GCC diagnostic push
340#if defined(__clang__)
341#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
344 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
346#pragma GCC diagnostic pop
359#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED)
361#pragma GCC diagnostic push
362#if defined(__clang__)
363#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
366 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
368#pragma GCC diagnostic pop
397#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
399#pragma GCC diagnostic push
400#if defined(__clang__)
401#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
404 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name);
406#pragma GCC diagnostic pop
421#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
423#pragma GCC diagnostic push
424#if defined(__clang__)
425#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
428 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
430#pragma GCC diagnostic pop
445#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
447#pragma GCC diagnostic push
448#if defined(__clang__)
449#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
452 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
454#pragma GCC diagnostic pop
469#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED)
471#pragma GCC diagnostic push
472#if defined(__clang__)
473#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
476 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
478#pragma GCC diagnostic pop
484 this->timings ().timestamp_begin ();
489 this->timings ().timestamp_end ();
Generated via doxygen2docusaurus 2.2.1 by Doxygen 1.17.0.