Skip to main content

test-reporter-tap.h File

C++ header file with declarations for the µTest++ TAP test reporter. More...

Included Headers

#include "test-reporter.h"

Namespaces Index

namespacemicro_os_plus

The primary namespace for the µOS++ framework. More...

namespacemicro_test_plus

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

Classes Index

classtest_reporter_tap

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

Description

C++ header file with declarations for the µTest++ TAP test reporter.

This header provides the declaration for test_reporter_tap, a concrete implementation of the test_reporter abstract interface that formats test results according to the Test Anything Protocol (TAP).

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.

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.

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
38
39#ifndef MICRO_TEST_PLUS_TEST_REPORTER_TAP_H_
40#define MICRO_TEST_PLUS_TEST_REPORTER_TAP_H_
41
42// ----------------------------------------------------------------------------
43
44#ifdef __cplusplus
45
46// ----------------------------------------------------------------------------
47
48#include "test-reporter.h"
49
50// ----------------------------------------------------------------------------
51
52#if defined(__GNUC__)
53#pragma GCC diagnostic push
54#pragma GCC diagnostic ignored "-Wpadded"
55#if defined(__clang__)
56#pragma clang diagnostic ignored "-Wc++98-compat"
57#endif
58#endif
59
61{
62 // --------------------------------------------------------------------------
63
84 class test_reporter_tap final : public test_reporter
85 {
86 public:
93 test_reporter_tap () = default;
94
99
104
110 = delete;
111
117 = delete;
118
122 ~test_reporter_tap () override = default;
123
132 void
133 endline (void) override;
134
142 void
143 begin_test_case (const char* name) override;
144
152 void
153 end_test_case (const char* name) override;
154
162 void
163 begin_test_suite (const char* name) override;
164
172 void
173 end_test_suite (test_suite_base& suite) override;
174
182 void
183 begin_test (size_t test_suites_count) override;
184
192 void
193 end_test (test_runner& runner) override;
194
203 void
204 flush (void) override;
205
214 void
215 output (void) override;
216
217 protected:
225 void
226 output_pass_prefix_ (std::string& message) override;
227
236 void
237 output_pass_suffix_ (void) override;
238
249 void
250 output_fail_prefix_ (std::string& message, const bool hasExpression,
251 const reflection::source_location& location) override;
252
261 void
263 bool abort) override;
264 };
265
266 // --------------------------------------------------------------------------
267} // namespace micro_os_plus::micro_test_plus
268
269#if defined(__GNUC__)
270#pragma GCC diagnostic pop
271#endif
272
273// ----------------------------------------------------------------------------
274
275#endif // __cplusplus
276
277// ----------------------------------------------------------------------------
278
279#endif // MICRO_TEST_PLUS_TEST_REPORTER_TAP_H_
280
281// ----------------------------------------------------------------------------

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.14.0.