35#ifndef MICRO_OS_PLUS_MICRO_TEST_PLUS_COUNTERS_H_
36#define MICRO_OS_PLUS_MICRO_TEST_PLUS_COUNTERS_H_
40#if defined(__cplusplus)
44#if __has_include("micro-os-plus/project-config.h")
45#include "micro-os-plus/project-config.h"
48#if __has_include("micro-os-plus/micro-test-plus-defines.h")
49#include "micro-os-plus/micro-test-plus-defines.h"
57#pragma GCC diagnostic push
60#pragma clang diagnostic ignored "-Wc++98-compat"
214#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
231 [[deprecated (
"use passed_checks() (since 6.0.0)"), nodiscard]]
size_t
269#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
286 [[deprecated (
"use executed_test_cases() (since 6.0.0)"),
330 passed (
void)
const noexcept;
332#if defined(MICRO_OS_PLUS_MICRO_TEST_PLUS_DEPRECATED_ENABLED)
349 [[deprecated (
"use passed() (since 6.0.0)"), nodiscard]]
bool
523#pragma GCC diagnostic pop
size_t failed_test_cases_
Total number of executed test cases that failed.
void increment_skipped_test_cases(size_t count=1) noexcept
Increments the skipped test cases counter.
bool passed(void) const noexcept
Checks whether all executed checks and test cases were successful.
void increment_executed_test_cases(size_t count=1) noexcept
Increments the executed test cases counter.
void increment_passed_checks(size_t count=1) noexcept
Increments the passed-checks counter.
size_t successful_checks(void) const noexcept
Deprecated name of passed_checks().
size_t skipped_test_cases(void) const noexcept
Returns the number of test cases skipped by the filter.
size_t executed_subtests(void) const noexcept
Deprecated name of executed_test_cases().
size_t executed_test_cases(void) const noexcept
Returns the number of test cases that were executed.
counters(void)=default
Default constructor.
size_t skipped_test_cases_
Total number of test cases skipped by the filter.
size_t passed_checks_
Total number of passed checks.
counters(counters &&other)=default
Move constructor.
size_t executed_checks(void) const noexcept
Returns the total number of checks executed.
size_t passed_checks(void) const noexcept
Returns the number of checks that passed.
size_t executed_test_cases_
Total number of test cases executed.
~counters()=default
Destructor.
void increment_failed_test_cases(size_t count=1) noexcept
Increments the failed test cases counter.
size_t failed_test_cases(void) const noexcept
Returns the number of executed test cases that failed.
friend class test_case
The test case, which counts an unexpected exception as a failed check.
size_t failed_checks_
Total number of failed checks.
size_t failed_checks(void) const noexcept
Returns the number of checks that failed.
friend class runner
The classes that maintain the counters.
friend class suite
The suite, which counts an unexpected exception as a failed check.
void increment_failed_checks(size_t count=1) noexcept
Increments the failed-checks counter.
counters & operator+=(const counters &other) noexcept
Accumulates the totals from another instance into this one.
counters & operator=(const counters &other)=default
Copy assignment operator.
bool was_successful(void) const noexcept
Deprecated name of passed().
counters(const counters &other)=default
Copy constructor.
The result of one check, reported when destroyed.
Non-template base for all runnable objects (suites and test cases).
The test runner for the µTest++ framework.
A named, runnable test suite registered with the test runner.
A named, runnable test case that lives inside a suite.
C++ header file with inline implementations for the µTest++ counters.
Internal implementation details for the µTest++ framework.
Primary namespace for the µTest++ testing framework.