17#ifndef MICRO_TEST_PLUS_TEST_SUITE_H_
18#define MICRO_TEST_PLUS_TEST_SUITE_H_
31#pragma GCC diagnostic push
32#pragma GCC diagnostic ignored "-Wpadded"
33#if !defined(__clang__)
34#pragma GCC diagnostic ignored "-Wsuggest-final-types"
35#pragma GCC diagnostic ignored "-Wsuggest-final-methods"
38#pragma clang diagnostic ignored "-Wc++98-compat"
106 [[nodiscard]]
constexpr const char*
138 [[nodiscard]]
constexpr int
150 [[nodiscard]]
constexpr int
162 [[nodiscard]]
constexpr int
194 [[nodiscard]]
constexpr bool
207 [[nodiscard]]
constexpr bool
269 template <
typename Callable_T,
typename... Args_T>
271 Args_T&&... arguments);
296#pragma GCC diagnostic pop
Base class for all test suites.
int failed_checks_
Count of test conditions that failed.
virtual void run(void)
Run the sequence of test cases in the suite.
test_suite_base(const char *name)
Construct a test suite.
int test_cases_
Count of test cases in the test suite.
void increment_failed(void)
Count one more failed test conditions.
constexpr bool unused(void)
If all counter are null, it is unused.
constexpr int failed_checks(void)
Get the number of conditions that failed.
void begin_test_case(const char *name)
Mark the beginning of a named test case.
const char * name_
The test suite name.
void increment_successful(void)
Count one more passed test conditions.
virtual ~test_suite_base()
constexpr const char * name()
Get the suite name.
void end_test_suite(void)
Mark the end of the test suite.
void end_test_case(void)
Mark the end of a test case.
test_suite_base & operator=(const test_suite_base &)=delete
test_suite_base(const test_suite_base &)=delete
bool process_deferred_begin
test_suite_base(test_suite_base &&)=delete
constexpr int successful_checks(void)
Get the number of conditions that passed.
int successful_checks_
Count of test conditions that passed.
void begin_test_suite(void)
Begin the execution of the test suite.
const char * test_case_name_
The current test case name.
constexpr bool was_successful(void)
Get the test suite result.
constexpr int test_cases(void)
Get the number of test cases.
struct micro_os_plus::micro_test_plus::test_suite_base::@0 current_test_case
Test suites are classes that represent a named group of test cases which self register to the runner.
std::function< void(void)> callable_
test_suite(const test_suite &)=delete
test_suite(const char *name, Callable_T &&callable, Args_T &&... arguments)
Construct a test suite.
test_suite & operator=(const test_suite &)=delete
virtual void run(void) override
Run the sequence of test cases in the suite.
test_suite(test_suite &&)=delete
virtual ~test_suite() override