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

Public Methods | |
| TestCase (std::string Name) | |
| Constructs a test case. More... | |
| TestCase () | |
| Constructs a test case for a suite. More... | |
| ~TestCase () | |
| Destructs a test case. More... | |
| virtual void | run (TestResult *result) |
| Run the test and catch any exceptions that are triggered by it. More... | |
| virtual int | countTestCases () const |
| Returns a count of all the tests executed. More... | |
| std::string | getName () const |
| Returns the name of the test case. More... | |
| std::string | toString () const |
| Returns the name of the test case instance. More... | |
| virtual TestResult * | run () |
| A default run method. More... | |
Protected Methods | |
| virtual void | runTest () |
| All the work for runTest is deferred to subclasses. More... | |
| TestResult * | defaultResult () |
| Create a default TestResult. More... | |
Private Methods | |
| 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. This TestCase is intended for use by the TestCaller and should not be used by a test case for which run() is called. |
|
|
Destructs a test case.
|
|
|
|
|
|
Returns a count of all the tests executed.
Implements CppUnit::Test. |
|
|
Create a default TestResult.
|
|
|
Returns the name of the test case.
Implements CppUnit::Test. |
|
|
|
|
|
A default run method.
|
|
|
Run the test and catch any exceptions that are triggered by it.
Implements CppUnit::Test. |
|
|
All the work for runTest is deferred to subclasses.
Reimplemented in CppUnit::Orthodox. |
|
|
Returns the name of the test case instance.
Implements CppUnit::Test. Reimplemented in CppUnit::TestCaller. |
|
|
|
|
|
hosts this site. |
Send comments to: CppUnit Developers |