A singleton object containing all test suites.
More...
#include <utpp.h>
A singleton object containing all test suites.
◆ Add()
void UnitTest::SuitesList::Add |
( |
const std::string & | suite_name, |
|
|
const TestSuite::Inserter * | inf ) |
|
inline |
Add a test to a suite
- Parameters
-
suite_name | name of suite that will contain the test |
inf | test information |
If a suite with that name does not exist, it is created now.
◆ Enable()
void UnitTest::SuitesList::Enable |
( |
const std::string & | suite, |
|
|
bool | enable = true ) |
|
inline |
Changes the enabled state of a suite. A suite that is not enabled will not be run.
- Parameters
-
suite | name of suite to be enabled or disabled |
enable | suite state |
◆ GetSuitesList()
SuitesList & UnitTest::SuitesList::GetSuitesList |
( |
| ) |
|
|
inlinestatic |
Accesses the singleton object.
- Returns
- The one and only SuitesList object
◆ Run()
int UnitTest::SuitesList::Run |
( |
const std::string & | suite_name, |
|
|
Reporter & | reporter, |
|
|
int | max_time_ms ) |
|
inline |
Run tests in a suite
- Parameters
-
suite_name | name of the suite to run |
reporter | test reporter to be used for results |
max_time_ms | global time constraint in milliseconds |
- Returns
- number of tests that failed or -1 if there is no such suite
◆ RunAll()
int UnitTest::SuitesList::RunAll |
( |
Reporter & | reporter, |
|
|
int | max_time_ms ) |
|
inline |
Run tests in all suites
- Parameters
-
reporter | test reporter to be used for results |
max_time_ms | global time constraint in milliseconds |
- Returns
- total number of failed tests
The documentation for this class was generated from the following file: