CppUnit project page | FAQ | CppUnit home page |
#include <TestCase.h>
Inheritance diagram for TestCase:
Public Member Functions | |
TestCase (const std::string &name) | |
Constructs a test case. | |
TestCase () | |
Constructs a test case for a suite. | |
~TestCase () | |
Destructs a test case. | |
virtual void | run (TestResult *result) |
Run the test and catch any exceptions that are triggered by it. | |
std::string | getName () const |
Returns the name of the test case. | |
virtual void | runTest () |
FIXME: this should probably be pure virtual. | |
Private Member Functions | |
TestCase (const TestCase &other) | |
TestCase & | operator= (const TestCase &other) |
Private Attributes | |
const std::string | m_name |
This class is used to implement a simple test case: define a subclass that overrides the runTest method.
You don't usually need to use that class, but TestFixture and TestCaller instead.
You are expected to subclass TestCase is you need to write a class similiar to TestCaller.
|
Constructs a test case.
|
|
Constructs a test case for a suite.
|
|
Destructs a test case.
|
|
|
|
Returns the name of the test case.
Implements Test. Reimplemented in TestCaseDecorator. |
|
|
|
Run the test and catch any exceptions that are triggered by it.
Implements Test. |
|
FIXME: this should probably be pure virtual.
Reimplemented in ExceptionTestCaseDecorator< ExpectedException >, Orthodox< ClassUnderTest >, TestCaseDecorator, and TestCaller< Fixture >. |
|
|
hosts this site. |
Send comments to: CppUnit Developers |