36#ifndef MICRO_OS_PLUS_MICRO_TEST_PLUS_INLINES_RUNNER_INLINES_H_
37#define MICRO_OS_PLUS_MICRO_TEST_PLUS_INLINES_RUNNER_INLINES_H_
41#if defined(__cplusplus)
45#if __has_include("micro-os-plus/diag/trace.h")
46#include "micro-os-plus/diag/trace.h"
52#pragma GCC diagnostic push
54#pragma GCC diagnostic ignored "-Waggregate-return"
56#pragma clang diagnostic ignored "-Wunknown-warning-option"
57#pragma clang diagnostic ignored "-Wc++98-compat"
58#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
59#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
61#pragma GCC diagnostic ignored "-Wredundant-tags"
106#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
134 inline std::span<const std::string>
137 return options_.application_arguments ();
140#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
188 template <
typename Callable_T,
typename... Args_T>
192 Args_T&&... arguments)
194#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED)
195 trace::printf (
"%s '%s'\n", __PRETTY_FUNCTION__,
name.
name ());
199 std::unique_ptr<class suite> child_suite{
new class suite (
200 std::move (name), *this, std::forward<Callable_T> (callable),
201 std::forward<Args_T> (arguments)...) };
206#if !defined(__DOXYGEN__)
212 template <typename Callable_T, typename... Args_T>
213 requires (!detail::suite_body<Callable_T, Args_T...>)
216 [[maybe_unused]] Callable_T&& callable,
217 [[maybe_unused]] Args_T&&... arguments)
223#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
229 template <
typename Callable_T,
typename... Args_T>
232 Args_T&&... arguments)
235 std::forward<Args_T> (arguments)...);
243#pragma GCC diagnostic pop
Aggregated check and test case counters for a node in the test tree.
Abstract base class for the reporters that display test results, including operand values for failure...
Measures the elapsed time of an operation.
A name of a suite or of a test case, with the location where it was given.
const char * name(void) const noexcept
Returns the name.
counters totals_
Totals of the test session.
bool has_option_errors(void) const noexcept
Checks whether an option error was found by initialise().
detail::stopwatch stopwatch_
Stopwatch of this runner.
void register_suite(std::unique_ptr< class suite > suite)
Registers a test suite with the runner.
auto verbosity_level(void) const noexcept -> micro_test_plus::verbosity
Returns the verbosity level of the console output.
void suite(std::string_view name, Callable_T &&callable, Args_T &&... arguments)
Deprecated name of add_suite().
const counters & totals(void) const noexcept
Returns the totals of the test session.
const char * name(void) const noexcept
Deprecated name of the runner.
detail::reporter & reporter(void) const noexcept
Deprecated access to the reporter of the test session.
std::unique_ptr< detail::reporter > reporter_
Owning pointer to the test reporter used for outputting test results.
std::span< const std::string > application_arguments(void) const noexcept
Returns the command-line arguments left to the application.
auto verbosity(void) const noexcept -> micro_test_plus::verbosity
Deprecated name of verbosity_level().
void add_suite(located_name name, Callable_T &&callable, Args_T &&... arguments)
Adds a test suite to the runner, to be run by run_suites().
runner_options options_
The options of the test session.
bool is_listing(void) const noexcept
Checks whether the test cases are listed instead of run.
const detail::stopwatch & timings(void) const noexcept
Deprecated access to the timings of the test session.
Concept satisfied by a callable object that can be the body of a suite.
verbosity
The verbosity levels for test reporting.
constexpr void reject_suite_body(void) noexcept
Stops the compilation with a message that tells what the body of a suite takes.
Primary namespace for the µTest++ testing framework.