UTPP
|
#include <utpp.h>
Classes | |
class | Inserter |
Constructor of this objects inserts the test in suite. More... | |
Public Member Functions | |
TestSuite (const std::string &name) | |
void | Add (const Inserter *inf) |
bool | IsEnabled () const |
Returns true if suite is enabled. | |
void | Enable (bool on_off) |
Enables or disables this suite. | |
int | RunTests (Reporter &reporter, int max_runtime_ms) |
Public Attributes | |
std::string | name |
Suite name. | |
A set of test cases that are run together.
A suite maintains a container with information about all tests included in the suite.
|
inline |
Add a new test information to test_list
inf | Pointer to Inserter information that will be added to the container |
Note that the container keeps the pointer itself and that could create lifetime issues. However this is not a problem in normal usage as inserter objects are statically created by the TEST... macros.
|
inline |
Run all tests in suite
rep | Reporter object to be used |
maxtime | maximum run time for each test |
Iterate through all test information objects doing the following:
Establish reporter as CurrentReporter and suite as CurrentSuite
Inform reporter that suite has started
Setup the test context
Run test
Tear down test context
Repeat for all tests
At the end invoke reporter SuiteFinish function