Skip to main content

runner Class

The test runner for the µTest++ framework. More...

Declaration

class micro_os_plus::micro_test_plus::runner { ... }

Included Headers

Base class

classtest_node

Base class for runners and runable tests. More...

Derived Classes

classstatic_runner

A runner variant that also manages statically-registered test suites. More...

Public Constructors Index

runner (const char *top_suite_name)

Deprecated constructor for the runner class. More...

runner (const runner &)=delete

Deleted copy constructor to prevent copying. More...

runner (runner &&)=delete

Deleted move constructor to prevent moving. More...

runner (void)

Constructor for the runner class. More...

Public Destructor Index

~runner () override

Destructor for the runner class. More...

Public Operators Index

runner &operator= (const runner &)=delete

Deleted copy assignment operator to prevent copying. More...

runner &operator= (runner &&)=delete

Deleted move assignment operator to prevent moving. More...

Public Member Functions Index

voidabort (const reflection::source_location &sl=reflection::source_location::current())

Aborts test execution immediately. More...

intexit_code (void)

Returns 0 if all tests were successful, 1 otherwise. More...

class suite &initialise (int argc, char *argv[], const char *top_suite_name="")

Initialises the test runner with command-line arguments. More...

const char *name (void) const noexcept

Gets the node name. More...

class reporter &reporter (void) const noexcept

Returns a reference to the test reporter. More...

template <typename Callable_T, typename... Args_T>
voidsuite (const char *name, Callable_T &&callable, Args_T &&... arguments)

Adds a test suite to the runner. More...

size_tsuites_count (void) const noexcept

Returns the count of test suites. More...

const detail::timestamps &timings () const noexcept

Gets the timings for this runner (const overload). More...

detail::timestamps &timings () noexcept

Gets the timings for this runner. More...

size_ttotal_suites_count (void) const noexcept

Returns the total count of registered test suites. More...

const runner_totals &totals () const noexcept

Gets the totals for the test (const overload). More...

runner_totals &totals () noexcept

Gets the totals for the test. More...

Protected Member Functions Index

voidregister_suite_ (std::unique_ptr< class suite > suite)

Registers a test suite with the runner. More...

voidrun_suites_ (void)

Runs all registered test suites. More...

Protected Member Attributes Index

std::vector< std::unique_ptr< class suite > >children_suites_

Owning collection of dynamically registered child suites. More...

const char *name_

The test node name. More...

std::unique_ptr< class reporter >reporter_

Pointer to the test reporter used for outputting test results. More...

detail::timestampstimings_

Timings for this runner. More...

class { ... }top_suite_

The implicit top-level suite; always present and executed first. More...

std::stringtop_suite_name_

Owned storage for the implicit top-suite name. More...

runner_totalstotals_

Totals for the test node, including nested cases. More...

Description

The test runner for the µTest++ framework.

The runner class is responsible for managing the registration and execution of test suites within the µTest++ framework. It maintains a collection of test suites, each of which registers itself automatically upon construction, enabling seamless integration and execution of tests across different components and folders of a project.

The test runner provides methods for initialising the test environment, registering test suites, retrieving the runner's name, and determining the overall test result via an exit code. It also offers an abort mechanism for terminating test execution in exceptional circumstances.

All members and methods are defined within the micro_os_plus::micro_test_plus namespace, ensuring clear separation from user code and minimising the risk of naming conflicts.

Definition at line 110 of file runner.h.

Public Constructors

runner()

micro_os_plus::micro_test_plus::runner::runner (const char * top_suite_name)

Deprecated constructor for the runner class.

Parameters
[in] top_suite_name

The name given to the implicit top suite. Defaults to an empty string.

Deprecated

Use the anonymous constructor.

The constructor initialises a new runner instance together with its top suite (top_suite_). If tracing is enabled, it outputs the function signature for diagnostic purposes.

Declaration at line 129 of file runner.h, definition at line 139 of file runner.cpp.

139 runner::runner (const char* top_suite_name)
140 : test_node{ "runner" }, top_suite_{ top_suite_name, *this }
141 {
142#if defined(MICRO_OS_PLUS_TRACE) \
143 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
144#if defined(__GNUC__)
145#pragma GCC diagnostic push
146#if defined(__clang__)
147#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
148#endif
149#endif
150 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name ());
151#if defined(__GNUC__)
152#pragma GCC diagnostic pop
153#endif
154#endif // MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED
155 }

References micro_os_plus::micro_test_plus::detail::test_node::test_node, micro_os_plus::micro_test_plus::detail::test_node::name and top_suite_.

runner()

micro_os_plus::micro_test_plus::runner::runner (const runner &)
delete

Deleted copy constructor to prevent copying.

Definition at line 134 of file runner.h.

Reference runner.

runner()

micro_os_plus::micro_test_plus::runner::runner (runner &&)
delete

Deleted move constructor to prevent moving.

Definition at line 139 of file runner.h.

Reference runner.

runner()

micro_os_plus::micro_test_plus::runner::runner (void)

Constructor for the runner class.

Parameters

None.

The constructor initialises a new runner instance together with its top suite (top_suite_). If tracing is enabled, it outputs the function signature for diagnostic purposes.

Declaration at line 119 of file runner.h, definition at line 116 of file runner.cpp.

116 runner::runner (void) : test_node{ "runner" }, top_suite_{ "", *this }
117 {
118#if defined(MICRO_OS_PLUS_TRACE) \
119 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
120#if defined(__GNUC__)
121#pragma GCC diagnostic push
122#if defined(__clang__)
123#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
124#endif
125#endif
126 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name ());
127#if defined(__GNUC__)
128#pragma GCC diagnostic pop
129#endif
130#endif // MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED
131 }

References micro_os_plus::micro_test_plus::detail::test_node::test_node, micro_os_plus::micro_test_plus::detail::test_node::name and top_suite_.

Referenced by runner, runner, micro_os_plus::micro_test_plus::static_runner::static_runner, micro_os_plus::micro_test_plus::static_runner::static_runner, operator=, operator=, micro_os_plus::micro_test_plus::static_runner::operator= and micro_os_plus::micro_test_plus::static_runner::register_static_suite.

Public Destructor

~runner()

micro_os_plus::micro_test_plus::runner::~runner ()
virtual

Destructor for the runner class.

The reporter_ unique pointer is released automatically. If tracing is enabled, the function signature is output for diagnostic purposes.

Declaration at line 158 of file runner.h, definition at line 162 of file runner.cpp.

163 {
164#if defined(MICRO_OS_PLUS_TRACE) \
165 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED)
166 trace::printf ("%s\n", __PRETTY_FUNCTION__);
167#endif // MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_CONSTRUCTORS_ENABLED
168
169 // reporter_ is a unique_ptr; destroyed automatically.
170 }

Public Operators

operator=()

runner & micro_os_plus::micro_test_plus::runner::operator= (const runner &)
delete

Deleted copy assignment operator to prevent copying.

Definition at line 145 of file runner.h.

Reference runner.

operator=()

runner & micro_os_plus::micro_test_plus::runner::operator= (runner &&)
delete

Public Member Functions

abort()

void micro_os_plus::micro_test_plus::runner::abort (const reflection::source_location & sl=reflection::source_location::current())

Aborts test execution immediately.

Parameters
sl

The source location from which the abort is triggered.

Returns

Nothing.

Prints the source location of the fatal error to stderr and then terminates the process via ::abort().

Declaration at line 210 of file runner.h, definition at line 440 of file runner.cpp.

441 {
442#if defined(MICRO_OS_PLUS_TRACE) \
443 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED)
444 trace::printf ("%s\n", __PRETTY_FUNCTION__);
445#endif // MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED
446
447#if defined(__GNUC__)
448#pragma GCC diagnostic push
449#if defined(__clang__)
450#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
451#endif
452#endif
453 fprintf (stderr, "\nerror: test execution aborted at %s:%u\n",
455#if defined(__GNUC__)
456#pragma GCC diagnostic pop
457#endif
458
459 ::abort ();
460 }

References abort, micro_os_plus::micro_test_plus::reflection::source_location::file_name, micro_os_plus::micro_test_plus::reflection::source_location::line and micro_os_plus::micro_test_plus::reflection::short_name.

Referenced by abort.

exit_code()

int micro_os_plus::micro_test_plus::runner::exit_code (void)

Returns 0 if all tests were successful, 1 otherwise.

Parameters

None.

Returns

Integer exit code representing the overall test result.

Finalises the top suite by recording its end timestamp and notifying the reporter, then accumulates its totals into the runner totals. Subsequently invokes run_suites_() to sort, execute, and accumulate all registered child suites. Finally, records the session end timestamp, notifies the reporter, and returns 0 if all checks passed or 1 otherwise.

Declaration at line 180 of file runner.h, definition at line 393 of file runner.cpp.

394 {
395#if defined(MICRO_OS_PLUS_TRACE) \
396 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED)
397 trace::printf ("%s\n", __PRETTY_FUNCTION__);
398#endif // MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED
399
400 if (reporter_ == nullptr)
401 {
402 fprintf (stderr, "error: test runner not initialised\n");
403 return 1;
404 }
405
406 top_suite_.timings ().timestamp_end ();
407 reporter_->end_suite (top_suite_);
408 totals_ += top_suite_.totals ();
409
410 run_suites_ ();
411
412 timings_.timestamp_end ();
413 reporter_->end_session (*this);
414
415 const int result = totals_.was_successful () ? 0 : 1;
416
417#if defined(MICRO_OS_PLUS_TRACE) \
418 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED)
419#if defined(__GNUC__)
420#pragma GCC diagnostic push
421#if defined(__clang__)
422#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
423#endif
424#endif
425 trace::printf ("%s -> %d\n", __PRETTY_FUNCTION__, result);
426#if defined(__GNUC__)
427#pragma GCC diagnostic pop
428#endif
429#endif // MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED
430
431 return result;
432 }

References reporter_, run_suites_, timings_, top_suite_ and micro_os_plus::micro_test_plus::detail::test_node::totals_.

initialise()

suite & micro_os_plus::micro_test_plus::runner::initialise (int argc, char * argv=[], const char * top_suite_name="")

Initialises the test runner with command-line arguments.

Parameters
argc

The argument count from main().

argv

The argument vector from main().

top_suite_name

The name given to the implicit top suite. Defaults to an empty string.

Returns

Reference to the top-level test suite.

Captures command-line arguments, selects the reporter implementation (human or tap), starts session timing, and emits the initial reporter notifications for the session and top suite.

If the top suite name is not provided, it attempts to derive a name from argv[0] or defaults to "default suite".

If tracing is enabled, the command-line arguments are also logged for diagnostic purposes.

Declaration at line 170 of file runner.h, definition at line 191 of file runner.cpp.

191 runner::initialise (int argc, char* argv[], const char* top_suite_name)
192 {
193#if defined(MICRO_OS_PLUS_TRACE) \
194 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED)
195 trace::printf ("%s\n", __PRETTY_FUNCTION__);
196#endif // MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED
197
198#if !(defined(MICRO_OS_PLUS_INCLUDE_STARTUP) && defined(MICRO_OS_PLUS_TRACE))
199#if defined(MICRO_OS_PLUS_DEBUG)
200 trace::printf ("argv[");
201 for (int i = 0; i < argc; ++i)
202 {
203 if (i > 0)
204 {
205 trace::printf (", ");
206 }
207 trace::printf ("'%s'", argv[i]);
208 }
209 trace::puts ("]");
210#endif // defined(MICRO_OS_PLUS_DEBUG)
211#endif // !defined(MICRO_OS_PLUS_INCLUDE_STARTUP)
212
213 if (strlen (top_suite_name) > 0)
214 {
215 // If provided by this call, use it, possibly override the
216 // deprecated constructor.
217 top_suite_name_ = top_suite_name;
218 top_suite_.name (top_suite_name_.c_str ());
219 }
220 else if (strlen (top_suite_.name ()) == 0)
221 {
222 // If not provided by the constructor or by this call, try to extract a
223 // name from argv[0], which is commonly the executable name. If that
224 // fails, use a default name.
225 if (argc > 0 && argv != nullptr && argv[0] != nullptr)
226 {
227 std::string_view top_suite_name_view{ utility::extract_file_name (
228 argv[0]) };
229
230 const auto dot_pos = top_suite_name_view.rfind ('.');
231 if (dot_pos != std::string_view::npos)
232 {
233 top_suite_name_view = top_suite_name_view.substr (0, dot_pos);
234 }
235
236 top_suite_name_ = top_suite_name_view;
237 }
238 else
239 {
240 top_suite_name_ = "default suite";
241 }
242 top_suite_.name (top_suite_name_.c_str ());
243 }
244
245 std::vector<std::string_view> argvs (argv, argv + argc);
246
247 std::string_view reporter_name{ "tap" };
248 static constexpr std::string_view reporter_prefix{ "--reporter=" };
249 for (size_t i = 0; i < argvs.size (); ++i)
250 {
251 if (argvs[i].starts_with (reporter_prefix))
252 {
253 reporter_name = argvs[i].substr (reporter_prefix.size ());
254 }
255 else if (argvs[i]
256 == reporter_prefix.substr (0, reporter_prefix.size () - 1))
257 {
258 if (i + 1 < argvs.size ())
259 {
260 reporter_name = argvs[++i];
261 }
262 else
263 {
264 fprintf (stderr, "error: --reporter option requires a "
265 "reporter name argument\n");
266 exit (1);
267 }
268 }
269 }
270
271 // Initialise and configure the reporter.
272 if (reporter_name == "human")
273 {
274 reporter_ = std::make_unique<reporter_human> (
275 std::make_unique<std::vector<std::string_view>> (
276 std::move (argvs)));
277 }
278 else if (reporter_name == "tap")
279 {
280 reporter_ = std::make_unique<reporter_tap> (
281 std::make_unique<std::vector<std::string_view>> (
282 std::move (argvs)));
283 }
284 else
285 {
286 fprintf (stderr, "error: unknown reporter '%.*s'\n",
287 static_cast<int> (reporter_name.size ()),
288 reporter_name.data ());
289 exit (1);
290 }
291
292 // ------------------------------------------------------------------------
293
294 timings_.timestamp_begin ();
295 reporter_->begin_session (*this);
296
297 top_suite_.timings ().timestamp_begin ();
298 reporter_->begin_suite (top_suite_);
299
300 return top_suite_;
301 }

References micro_os_plus::micro_test_plus::utility::extract_file_name, reporter_, timings_, top_suite_ and top_suite_name_.

name()

reporter()

class reporter & micro_os_plus::micro_test_plus::runner::reporter (void)
inline nodiscard noexcept

Returns a reference to the test reporter.

Parameters

None.

Returns

Reference to the test reporter.

Returns a reference to the reporter object stored in the unique pointer.

Declaration at line 234 of file runner.h, definition at line 77 of file runner-inlines.h.

77 runner::reporter (void) const noexcept
78 {
79 return *reporter_;
80 }

Reference reporter_.

Referenced by operator=.

suite()

template <typename Callable_T, typename... Args_T>
void micro_os_plus::micro_test_plus::runner::suite (const char * name, Callable_T && callable, Args_T &&... arguments)

Adds a test suite to the runner.

Template Parameters
Callable_T

The type of a callable object.

Args_T

The types of the callable arguments.

Parameters
[in] name

The test suite name or description, used in reports.

[in] callable

A generic callable object, usually a lambda, invoked to perform the test suite.

[in] arguments

A possibly empty list of arguments to be passed to the callable.

Returns

Nothing.

Constructs a suite object on the heap, binding the callable and any additional arguments, then transfers ownership to the runner via register_suite_(). The suite runs immediately as part of the registration process.

Declaration at line 198 of file runner.h, definition at line 113 of file runner-inlines.h.

113 runner::suite (const char* name, Callable_T&& callable,
114 Args_T&&... arguments)
115 {
116#if defined(MICRO_OS_PLUS_TRACE) \
117 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED)
118#if defined(__GNUC__)
119#pragma GCC diagnostic push
120#if defined(__clang__)
121#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
122#endif
123#endif
124 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, name);
125#if defined(__GNUC__)
126#pragma GCC diagnostic pop
127#endif
128#endif // MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED
129
130 auto child_suite = std::make_unique<class suite> (
131 name, *this, std::forward<Callable_T> (callable),
132 std::forward<Args_T> (arguments)...);
133
134 register_suite_ (std::move (child_suite));
135 }

References micro_os_plus::micro_test_plus::detail::test_node::name and register_suite_.

Referenced by operator=, micro_os_plus::micro_test_plus::static_runner::operator=, micro_os_plus::micro_test_plus::static_runner::register_static_suite and register_suite_.

suites_count()

size_t micro_os_plus::micro_test_plus::runner::suites_count (void)
nodiscard noexcept

Returns the count of test suites.

Parameters

None.

Returns

The number of test suites, including the top one.

Returns the number of registered child suites plus one, accounting for the top suite.

Declaration at line 264 of file runner.h, definition at line 468 of file runner.cpp.

468 runner::suites_count (void) const noexcept
469 {
470 return children_suites_.size () + 1;
471 }

Reference children_suites_.

Referenced by operator=, micro_os_plus::micro_test_plus::static_runner::run_suites_, total_suites_count and micro_os_plus::micro_test_plus::static_runner::total_suites_count.

timings()

const detail::timestamps & micro_os_plus::micro_test_plus::runner::timings ()
inline nodiscard noexcept

Gets the timings for this runner (const overload).

Parameters

None.

Returns

A const reference to the timestamps instance.

Returns a const reference to the timestamps member.

Declaration at line 254 of file runner.h, definition at line 97 of file runner-inlines.h.

97 runner::timings () const noexcept
98 {
99 return timings_;
100 }

Reference timings_.

timings()

detail::timestamps & micro_os_plus::micro_test_plus::runner::timings ()
inline nodiscard noexcept

Gets the timings for this runner.

Parameters

None.

Returns

A reference to the timestamps instance.

Returns a reference to the timestamps member.

Declaration at line 244 of file runner.h, definition at line 87 of file runner-inlines.h.

87 runner::timings () noexcept
88 {
89 return timings_;
90 }

Reference timings_.

Referenced by micro_os_plus::micro_test_plus::reporter_human::end_session, micro_os_plus::micro_test_plus::reporter_tap::end_session and operator=.

total_suites_count()

size_t micro_os_plus::micro_test_plus::runner::total_suites_count (void)
nodiscard noexcept virtual

Returns the total count of registered test suites.

Parameters

None.

Returns

The total number of test suites managed by this runner.

For the base runner, the total suite count equals suites_count(), as there are no additional static suites.

Declaration at line 224 of file runner.h, definition at line 479 of file runner.cpp.

479 runner::total_suites_count (void) const noexcept
480 {
481 return suites_count ();
482 }

Reference suites_count.

Referenced by micro_os_plus::micro_test_plus::reporter_human::end_session and micro_os_plus::micro_test_plus::reporter_tap::end_session.

totals()

const runner_totals & micro_os_plus::micro_test_plus::detail::test_node::totals ()
inline nodiscard noexcept

Gets the totals for the test (const overload).

Parameters

None.

Returns

A const reference to the runner_totals instance.

Returns a const reference to the runner_totals member.

Declaration at line 215 of file test.h, definition at line 112 of file test-inlines.h.

112 test_node::totals () const noexcept
113 {
114 return totals_;
115 }

Reference micro_os_plus::micro_test_plus::detail::test_node::totals_.

totals()

Protected Member Functions

register_suite_()

void micro_os_plus::micro_test_plus::runner::register_suite_ (std::unique_ptr< class suite > suite)
protected

Registers a test suite with the runner.

Parameters
[in] suite

Owning pointer to the test suite to register.

Returns

Nothing.

Takes ownership of the supplied suite unique pointer and appends it to the internal children_suites_ vector, deferring execution until run_suites_() is called. If tracing is enabled, the suite name is logged for diagnostic purposes.

Declaration at line 284 of file runner.h, definition at line 316 of file runner.cpp.

316 runner::register_suite_ (std::unique_ptr<class suite> suite)
317 {
318#if defined(MICRO_OS_PLUS_TRACE) \
319 && defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED)
320#if defined(__GNUC__)
321#pragma GCC diagnostic push
322#if defined(__clang__)
323#pragma clang diagnostic ignored "-Wunsafe-buffer-usage-in-libc-call"
324#endif
325#endif
326 trace::printf ("%s '%s'\n", __PRETTY_FUNCTION__, suite->name ());
327#if defined(__GNUC__)
328#pragma GCC diagnostic pop
329#endif
330#endif // MICRO_OS_PLUS_MICRO_TEST_PLUS_TRACE_ENABLED
331
332 children_suites_.push_back (std::move (suite));
333 }

References children_suites_ and suite.

Referenced by operator= and suite.

run_suites_()

void micro_os_plus::micro_test_plus::runner::run_suites_ (void)
protected virtual

Runs all registered test suites.

Parameters

None.

Sorts children_suites_ alphabetically by suite name using a selection sort on unique_ptr::swap, avoiding the -Waggregate-return diagnostic that std::sort would trigger on unique-pointer iterators. Each suite is assigned a 1-based index offset by the top-suite index, executed via suite::run(), and its totals are accumulated into the runner totals. The executed-subtest counter is not incremented; suites are not counted as subtests.

Declaration at line 274 of file runner.h, definition at line 346 of file runner.cpp.

347 {
348 // Use selection sort with unique_ptr::swap (returns void) to avoid
349 // std::sort triggering -Waggregate-return via std::move_backward,
350 // which returns a class-type iterator when operating on unique_ptr
351 // elements.
352 const size_t n = children_suites_.size ();
353 for (size_t i = 0; i < n; ++i)
354 {
355 size_t min_idx = i;
356 for (size_t j = i + 1; j < n; ++j)
357 {
358 if (std::string_view{ children_suites_[j]->name () }
359 < std::string_view{ children_suites_[min_idx]->name () })
360 min_idx = j;
361 }
362 if (min_idx != i)
363 children_suites_[i].swap (children_suites_[min_idx]);
364 }
365
366 for (size_t i = 0; i < n; ++i)
367 {
368 auto* suite_ptr = children_suites_[i].get ();
369
370 // 1 for 1-based index, 1 for top suite
371 suite_ptr->own_index (i + 1 + 1);
372
373 // Run the child suite immediately.
374 suite_ptr->run ();
375
376 // Accumulate the totals from the child suite into the runner
377 // totals.
378 // DO NOT increment executed_subtests here.
379 totals_ += suite_ptr->totals ();
380 }
381 }

References children_suites_ and micro_os_plus::micro_test_plus::detail::test_node::totals_.

Referenced by exit_code, operator= and micro_os_plus::micro_test_plus::static_runner::run_suites_.

Protected Member Attributes

children_suites_

std::vector<std::unique_ptr<class suite> > micro_os_plus::micro_test_plus::runner::children_suites_
protected

Owning collection of dynamically registered child suites.

Each call to runner::suite() appends a new suite to this vector and runs it immediately. The vector retains ownership of all suites for the lifetime of the runner.

Definition at line 301 of file runner.h.

301 std::vector<std::unique_ptr<class suite>> children_suites_;

Referenced by register_suite_, run_suites_ and suites_count.

name_

const char* micro_os_plus::micro_test_plus::detail::test_node::name_
protected

reporter_

std::unique_ptr<class reporter> micro_os_plus::micro_test_plus::runner::reporter_
protected

Pointer to the test reporter used for outputting test results.

Definition at line 306 of file runner.h.

306 std::unique_ptr<class reporter> reporter_;

Referenced by exit_code, initialise and reporter.

timings_

detail::timestamps micro_os_plus::micro_test_plus::runner::timings_
protected

Timings for this runner.

Definition at line 311 of file runner.h.

311 detail::timestamps timings_;

Referenced by exit_code, initialise, timings and timings.

top_suite_

class top_suite micro_os_plus::micro_test_plus::runner::top_suite_
protected

The implicit top-level suite; always present and executed first.

Definition at line 291 of file runner.h.

Referenced by runner, runner, exit_code and initialise.

top_suite_name_

std::string micro_os_plus::micro_test_plus::runner::top_suite_name_
protected

Owned storage for the implicit top-suite name.

Definition at line 316 of file runner.h.

316 std::string top_suite_name_;

Referenced by initialise.

totals_

runner_totals micro_os_plus::micro_test_plus::detail::test_node::totals_
protected

The documentation for this class was generated from the following files:


Generated via doxygen2docusaurus 2.2.0 by Doxygen 1.17.0.