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 defined(MICRO_OS_PLUS_INCLUDE_CONFIG_H)
47#include <micro-os-plus/config.h>
50#if defined(MICRO_OS_PLUS_TRACE)
51#include <micro-os-plus/diag/trace.h>
61#pragma clang diagnostic ignored "-Wc++98-compat"
62#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
64#pragma GCC diagnostic ignored "-Wredundant-tags"
65#pragma GCC diagnostic ignored "-Wsuggest-final-types"
66#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
86#if defined(MICRO_OS_PLUS_TRACE) \
87 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
89#pragma GCC diagnostic push
91#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
94 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name);
96#pragma GCC diagnostic pop
109#if defined(MICRO_OS_PLUS_TRACE) \
110 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
112#pragma GCC diagnostic push
113#if defined(__clang__)
114#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
117 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
119#pragma GCC diagnostic pop
140#if defined(MICRO_OS_PLUS_TRACE) \
141 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
143#pragma GCC diagnostic push
144#if defined(__clang__)
145#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
148 trace::printf ("%s '%s' %zu\n", __PRETTY_FUNCTION__, name, own_index_);
150#pragma GCC diagnostic pop
164#if defined(MICRO_OS_PLUS_TRACE) \
165 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
167#pragma GCC diagnostic push
168#if defined(__clang__)
169#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
172 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
174#pragma GCC diagnostic pop
216 std::unique_ptr<class subtest> child_test, suite& suite)
226#if defined(MICRO_OS_PLUS_TRACE) \
227 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
229#pragma GCC diagnostic push
230#if defined(__clang__)
231#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
234 trace::printf ("%s subtest '%s' executed one more subtest\n",
235 __PRETTY_FUNCTION__, name ());
237#pragma GCC diagnostic pop
244#if defined(MICRO_OS_PLUS_TRACE) \
245 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
247#pragma GCC diagnostic push
248#if defined(__clang__)
249#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
252 trace::printf ("%s suite '%s' totals\n", __PRETTY_FUNCTION__,
255#pragma GCC diagnostic pop
277#if defined(MICRO_OS_PLUS_TRACE) \
278 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
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_TRACE) \
301 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
303#pragma GCC diagnostic push
304#if defined(__clang__)
305#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
308 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
310#pragma GCC diagnostic pop
338#if defined(MICRO_OS_PLUS_TRACE) \
339 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
341#pragma GCC diagnostic push
342#if defined(__clang__)
343#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
346 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
348#pragma GCC diagnostic pop
361#if defined(MICRO_OS_PLUS_TRACE) \
362 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
364#pragma GCC diagnostic push
365#if defined(__clang__)
366#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
369 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
371#pragma GCC diagnostic pop
400#if defined(MICRO_OS_PLUS_TRACE) \
401 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
403#pragma GCC diagnostic push
404#if defined(__clang__)
405#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
408 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name);
410#pragma GCC diagnostic pop
425#if defined(MICRO_OS_PLUS_TRACE) \
426 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
428#pragma GCC diagnostic push
429#if defined(__clang__)
430#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
433 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
435#pragma GCC diagnostic pop
450#if defined(MICRO_OS_PLUS_TRACE) \
451 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS_CONSTRUCTORS)
453#pragma GCC diagnostic push
454#if defined(__clang__)
455#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
458 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
460#pragma GCC diagnostic pop
475#if defined(MICRO_OS_PLUS_TRACE) \
476 && defined(MICRO_OS_PLUS_TRACE_MICRO_TEST_PLUS)
478#pragma GCC diagnostic push
479#if defined(__clang__)
480#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
483 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name_);
485#pragma GCC diagnostic pop
Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.