| CppUnit project page | FAQ | CppUnit home page |
#include <TestSuite.h>
Inheritance diagram for CppUnit::TestSuite:

Public Methods | |
| TestSuite (std::string name="") | |
| Default constructor. More... | |
| ~TestSuite () | |
| Destructor. More... | |
| void | run (TestResult *result) |
| Runs the tests and collects their result in a TestResult. More... | |
| int | countTestCases () const |
| Counts the number of test cases that will be run by this test. More... | |
| std::string | getName () const |
| Returns the name of the test suite. More... | |
| std::string | toString () const |
| Returns a string representation of the test suite. More... | |
| void | addTest (Test *test) |
| Adds a test to the suite. More... | |
| const std::vector< Test * > & | getTests () const |
| virtual void | deleteContents () |
| Deletes all tests in the suite. More... | |
Private Methods | |
| TestSuite (const TestSuite &other) | |
| TestSuite & | operator= (const TestSuite &other) |
Private Attributes | |
| std::vector< Test * > | m_tests |
| const std::string | m_name |
It runs a collection of test cases. Here is an example.
CppUnit::TestSuite *suite= new CppUnit::TestSuite(); suite->addTest(new CppUnit::TestCaller<MathTest> ( "testAdd", testAdd)); suite->addTest(new CppUnit::TestCaller<MathTest> ( "testDivideByZero", testDivideByZero));
TestSuites do not register themselves in the TestRegistry.
|
|
Default constructor.
|
|
|
Destructor.
|
|
|
|
|
|
Adds a test to the suite.
|
|
|
Counts the number of test cases that will be run by this test.
Implements CppUnit::Test. |
|
|
Deletes all tests in the suite.
|
|
|
Returns the name of the test suite.
Implements CppUnit::Test. |
|
|
|
|
|
|
|
|
Runs the tests and collects their result in a TestResult.
Implements CppUnit::Test. |
|
|
Returns a string representation of the test suite.
Implements CppUnit::Test. |
|
|
|
|
|
|
|
|
hosts this site. |
Send comments to: CppUnit Developers |