CppUnit project page | FAQ | CppUnit home page |
#include <TestSuite.h>
Inheritance diagram for TestSuite:
Public Member Functions | |
TestSuite (std::string name="") | |
Default constructor. | |
~TestSuite () | |
Destructor. | |
void | addTest (Test *test) |
Adds a test to the suite. | |
const CppUnitVector< Test * > & | getTests () const |
virtual void | deleteContents () |
Deletes all tests in the suite. | |
int | getChildTestCount () const |
Returns the number of direct child of the test. | |
Test * | doGetChildTestAt (int index) const |
Returns the child test of the specified valid index. | |
Private Attributes | |
CppUnitVector< Test * > | m_tests |
It runs a collection of test cases. Here is an example.
Note that TestSuites assume lifetime control for any tests added to them. TestSuites do not register themselves in the TestRegistry. Test TestCallerCppUnit::TestSuite *suite= new CppUnit::TestSuite(); suite->addTest(new CppUnit::TestCaller<MathTest> ( "testAdd", testAdd)); suite->addTest(new CppUnit::TestCaller<MathTest> ( "testDivideByZero", testDivideByZero));
|
Default constructor. Constructs a test suite with the specified name. |
|
Destructor.
|
|
Adds a test to the suite. Adds the specified test to the suite.
|
|
Deletes all tests in the suite. Destroys all the tests of the suite. |
|
Returns the child test of the specified valid index.
Implements Test. Reimplemented in TestRunner::WrappingSuite. |
|
Returns the number of direct child of the test.
Implements Test. Reimplemented in TestRunner::WrappingSuite. |
|
Returns the list of the tests (DEPRECATED).
|
|
|
hosts this site. |
Send comments to: CppUnit Developers |