![]() |
Peano
|
Contains a sequence of tests which have to be executed sequentially. More...
#include <TestCaseCollection.h>
Public Member Functions | |
TestCaseCollection (const std::string &testCaseCollectionName, bool deleteTestCases=true, bool writeToLog=true) | |
Creates a test case collection. | |
virtual | ~TestCaseCollection () |
Destructor. | |
virtual void | run () |
Runs all test cases assigned. | |
void | addTestCase (TestCase *testCase) |
Adds a new test case. | |
![]() | |
TestCase (const std::string &testCaseName) | |
Constructor. | |
virtual | ~TestCase () |
Destructor. | |
int | getNumberOfErrors () const |
std::string | getTestCaseName () const |
Private Member Functions | |
TestCaseCollection () | |
Private Attributes | |
std::list< TestCase * > | _testCases |
Sequence of test cases that are executes on a run() call. | |
bool | _writeToLog |
Tells the collection wheather to log a progression bar. | |
bool | _deleteTestCases |
Tells whether the testcases contained should be deleted uppon destruction of this object. | |
Static Private Attributes | |
static tarch::logging::Log | _log |
Log interface the class writes to. | |
Additional Inherited Members | |
![]() | |
TestCase ()=delete | |
![]() | |
const std::string | _testCaseName |
Name of the test case. | |
int | _errors |
Error counter. | |
bool | _error |
Indicate within macro if one specific validation failed. | |
Contains a sequence of tests which have to be executed sequentially.
The object manages a sequence of references. The user is responsible for creating and destroying the test case instances.
Definition at line 29 of file TestCaseCollection.h.
|
private |
Definition at line 7 of file TestCaseCollection.cpp.
tarch::tests::TestCaseCollection::TestCaseCollection | ( | const std::string & | testCaseCollectionName, |
bool | deleteTestCases = true, | ||
bool | writeToLog = true ) |
Creates a test case collection.
testCaseCollectionName | Name of the test case collection. |
Definition at line 12 of file TestCaseCollection.cpp.
|
virtual |
Destructor.
Definition at line 19 of file TestCaseCollection.cpp.
Adds a new test case.
Although you pass a pointer, you are still responsible for the instance management.
You have to specify in the constructor of a TestCaseCollection whether it should delete test cases contained on construction.
Definition at line 58 of file TestCaseCollection.cpp.
|
virtual |
Runs all test cases assigned.
Implements tarch::tests::TestCase.
Definition at line 29 of file TestCaseCollection.cpp.
References tarch::tests::TestCase::getNumberOfErrors(), logInfo, logTraceInWith1Argument, logTraceOutWith2Arguments, and tarch::tests::TestCase::run().
|
private |
Tells whether the testcases contained should be deleted uppon destruction of this object.
Definition at line 50 of file TestCaseCollection.h.
|
staticprivate |
Log interface the class writes to.
Definition at line 45 of file TestCaseCollection.h.
|
private |
Sequence of test cases that are executes on a run() call.
The class is not responsible for destroying them.
Definition at line 35 of file TestCaseCollection.h.
|
private |
Tells the collection wheather to log a progression bar.
Definition at line 40 of file TestCaseCollection.h.