Generic test runner.
More...
#include <TestRunner.h>
Generic test runner.
The TestRunner assumes ownership of all added tests: you can not add test or suite that are local variable since they can't be deleted.
Example of usage:
int
{
CppUnit::TestResultCollector result;
CppUnit::TextTestProgressListener
progress;
runner.addTest( CppUnit::TestFactoryRegistry::getRegistry().makeTest() );
try
{
std::cerr << std::endl;
CppUnit::CompilerOutputter
outputter( &result, std::cerr );
}
catch ( std::invalid_argument &
e )
{
std::cerr << std::endl
<< std::endl;
return 0;
}
return result.wasSuccessful() ? 0 : 1;
}
Generate a test case from a fixture method.
Definition TestCaller.h:107
virtual void run(TestResult *result)
Run the test and catch any exceptions that are triggered by it.
Definition TestCase.cpp:53
◆ TestRunner() [1/2]
TestRunner::TestRunner |
( |
| ) |
|
◆ ~TestRunner()
TestRunner::~TestRunner |
( |
| ) |
|
|
virtual |
◆ TestRunner() [2/2]
Prevents the use of the copy constructor.
◆ addTest()
Adds the specified test.
- Parameters
-
◆ operator=()
Prevents the use of the copy operator.
◆ run()
Runs a test using the specified controller.
- Parameters
-
- Exceptions
-
◆ m_suite
The documentation for this class was generated from the following files: