micro-test-plus 6.0.1
µTest++ Testing Framework
Loading...
Searching...
No Matches
reporter.cpp File Reference

C++ source file with implementations for the µTest++ test reporter member functions. More...

Go to the source code of this file.

Namespaces

namespace  micro_os_plus
 The primary namespace for the µOS++ framework.
namespace  micro_os_plus::micro_test_plus
 Primary namespace for the µTest++ testing framework.
namespace  micro_os_plus::micro_test_plus::detail
 Internal implementation details for the µTest++ framework.
namespace  micro_os_plus::micro_test_plus::detail::anonymous_namespace{reporter.cpp}
 Local helpers of the reporter base class.

Functions

reporter & micro_os_plus::micro_test_plus::detail::endl (reporter &stream)
 Output stream manipulator for ending a line in test reports.
void micro_os_plus::micro_test_plus::detail::anonymous_namespace{reporter.cpp}::format_skipped (size_t count, char(&message)[fragment_size])
 Formats the number of items skipped by the filter.
constexpr const char * micro_os_plus::micro_test_plus::detail::anonymous_namespace{reporter.cpp}::plural (size_t count) noexcept
 Returns the plural suffix for a count.
void micro_os_plus::micro_test_plus::detail::anonymous_namespace{reporter.cpp}::write_without_colours (FILE *file, std::string_view text)
 Writes a text to a file, without the ANSI colour sequences.

Variables

constexpr size_t micro_os_plus::micro_test_plus::detail::anonymous_namespace{reporter.cpp}::fragment_size = 21 + (std::numeric_limits<size_t>::digits10 + 1)
 Size of the array that receives a fragment of the totals.

Detailed Description

This source file contains the core implementations for the test reporting facilities of the µTest++ framework. It provides lifecycle and utility behaviour for reporters, including output-file handling, informational banner emission, buffering helpers, stream operators, the formatting of the totals and of the elapsed times, and pass/fail dispatch to reporter-specific prefix/suffix hooks. The command-line options are parsed by runner_options.

Concrete formatting behaviour is implemented by derived reporters (reporter_human and reporter_tap).

All definitions reside within the micro_os_plus::micro_test_plus::detail namespace, since the reporters are internal to the framework.

This file must be included when building the µTest++ library.

Definition in file reporter.cpp.