Test suites are classes that represent a named group of test cases which self register to the runner.
More...
#include <micro-os-plus/micro-test-plus.h>
Test suites are classes that represent a named group of test cases which self register to the runner.
Definition at line 255 of file test-suite.h.
◆ test_suite() [1/3]
template<typename Callable_T , typename... Args_T>
micro_os_plus::micro_test_plus::test_suite::test_suite |
( |
const char * | name, |
|
|
Callable_T && | callable, |
|
|
Args_T &&... | arguments ) |
Construct a test suite.
- Template Parameters
-
Callable_T | The type of an object that can be called. |
Args_T | The type of the callable arguments. |
- Parameters
-
[in] | name | The test case name or description. A short string used in the report. |
[in] | callable | A generic callable object, invoked to perform the test. Usually a lambda. |
[in] | arguments | A possibly empty list of arguments to be passed to the callable. |
Definition at line 41 of file inlines.h.
◆ test_suite() [2/3]
micro_os_plus::micro_test_plus::test_suite::test_suite |
( |
const test_suite & | | ) |
|
|
delete |
◆ test_suite() [3/3]
micro_os_plus::micro_test_plus::test_suite::test_suite |
( |
test_suite && | | ) |
|
|
delete |
◆ ~test_suite()
micro_os_plus::micro_test_plus::test_suite::~test_suite |
( |
| ) |
|
|
overridevirtual |
◆ begin_test_case()
void micro_os_plus::micro_test_plus::test_suite_base::begin_test_case |
( |
const char * | name | ) |
|
|
inherited |
Mark the beginning of a named test case.
- Parameters
-
[in] | name | The test case name. |
- Returns
- Nothing.
Definition at line 79 of file test-suite.cpp.
◆ begin_test_suite()
void micro_os_plus::micro_test_plus::test_suite_base::begin_test_suite |
( |
void | | ) |
|
|
inherited |
Begin the execution of the test suite.
- Parameters
- None.
- Returns
- Nothing.
Definition at line 61 of file test-suite.cpp.
◆ end_test_case()
void micro_os_plus::micro_test_plus::test_suite_base::end_test_case |
( |
void | | ) |
|
|
inherited |
Mark the end of a test case.
- Parameters
- None.
- Returns
- Nothing.
Definition at line 95 of file test-suite.cpp.
◆ end_test_suite()
void micro_os_plus::micro_test_plus::test_suite_base::end_test_suite |
( |
void | | ) |
|
|
inherited |
Mark the end of the test suite.
- Parameters
- None.
- Returns
- Nothing.
Definition at line 69 of file test-suite.cpp.
◆ failed_checks()
constexpr int micro_os_plus::micro_test_plus::test_suite_base::failed_checks |
( |
void | | ) |
|
|
inlineconstexprinherited |
Get the number of conditions that failed.
- Parameters
- None.
- Returns
- An integer with the number checks that failed.
Definition at line 151 of file test-suite.h.
◆ increment_failed()
void micro_os_plus::micro_test_plus::test_suite_base::increment_failed |
( |
void | | ) |
|
|
inherited |
Count one more failed test conditions.
- Parameters
- None.
- Returns
- Nothing.
Definition at line 108 of file test-suite.cpp.
◆ increment_successful()
void micro_os_plus::micro_test_plus::test_suite_base::increment_successful |
( |
void | | ) |
|
|
inherited |
Count one more passed test conditions.
- Parameters
- None.
- Returns
- Nothing.
Definition at line 101 of file test-suite.cpp.
◆ name()
constexpr const char * micro_os_plus::micro_test_plus::test_suite_base::name |
( |
| ) |
|
|
inlineconstexprinherited |
Get the suite name.
- Parameters
- None.
- Returns
- A pointer to the null terminated test suite name.
Definition at line 107 of file test-suite.h.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ run()
void micro_os_plus::micro_test_plus::test_suite::run |
( |
void | | ) |
|
|
overridevirtual |
◆ successful_checks()
constexpr int micro_os_plus::micro_test_plus::test_suite_base::successful_checks |
( |
void | | ) |
|
|
inlineconstexprinherited |
Get the number of conditions that passed.
- Parameters
- None.
- Returns
- An integer with the number checks that passed.
Definition at line 139 of file test-suite.h.
◆ test_cases()
constexpr int micro_os_plus::micro_test_plus::test_suite_base::test_cases |
( |
void | | ) |
|
|
inlineconstexprinherited |
Get the number of test cases.
- Parameters
- None.
- Returns
- An integer with the number of test cases.
Definition at line 163 of file test-suite.h.
◆ unused()
constexpr bool micro_os_plus::micro_test_plus::test_suite_base::unused |
( |
void | | ) |
|
|
inlineconstexprinherited |
If all counter are null, it is unused.
- Parameters
- None.
- Returns
- True if the test suite is not used.
Definition at line 208 of file test-suite.h.
◆ was_successful()
constexpr bool micro_os_plus::micro_test_plus::test_suite_base::was_successful |
( |
void | | ) |
|
|
inlineconstexprinherited |
Get the test suite result.
- Parameters
- None.
- Returns
- True if the test suite was successful.
Definition at line 195 of file test-suite.h.
◆ callable_
std::function<void (void)> micro_os_plus::micro_test_plus::test_suite::callable_ |
|
protected |
◆ [struct]
struct { ... } micro_os_plus::micro_test_plus::test_suite_base::current_test_case |
◆ failed_checks
int micro_os_plus::micro_test_plus::test_suite_base::failed_checks |
|
inherited |
◆ failed_checks_
int micro_os_plus::micro_test_plus::test_suite_base::failed_checks_ = 0 |
|
protectedinherited |
Count of test conditions that failed.
Definition at line 233 of file test-suite.h.
◆ name_
const char* micro_os_plus::micro_test_plus::test_suite_base::name_ |
|
protectedinherited |
◆ process_deferred_begin
bool micro_os_plus::micro_test_plus::test_suite_base::process_deferred_begin = true |
|
inherited |
◆ successful_checks
int micro_os_plus::micro_test_plus::test_suite_base::successful_checks |
|
inherited |
◆ successful_checks_
int micro_os_plus::micro_test_plus::test_suite_base::successful_checks_ = 0 |
|
protectedinherited |
Count of test conditions that passed.
Definition at line 228 of file test-suite.h.
◆ test_case_name_
const char* micro_os_plus::micro_test_plus::test_suite_base::test_case_name_ |
|
protectedinherited |
◆ test_cases_
int micro_os_plus::micro_test_plus::test_suite_base::test_cases_ = 0 |
|
protectedinherited |
Count of test cases in the test suite.
Definition at line 238 of file test-suite.h.
The documentation for this class was generated from the following files: