|
| ExceptionTestCaseDecorator (TestCase *test) |
| Decorates the specified test.
|
|
void | runTest () |
| Checks that the expected exception is thrown by the decorated test. is thrown.
|
|
| TestCaseDecorator (TestCase *test) |
|
| ~TestCaseDecorator () |
|
std::string | getName () const |
| Returns the name of the test case.
|
|
void | setUp () |
| Set up context before running a test.
|
|
void | tearDown () |
| Clean up after the test run.
|
|
void | runTest () |
| FIXME: this should probably be pure virtual.
|
|
| 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.
|
|
int | countTestCases () const |
|
int | getChildTestCount () const |
|
Test * | doGetChildTestAt (int index) const |
|
virtual | ~Test () |
|
virtual void | run (TestResult *result)=0 |
| Run the test, collecting results.
|
|
virtual int | countTestCases () const =0 |
| Return the number of test cases invoked by run().
|
|
virtual int | getChildTestCount () const =0 |
| Returns the number of direct child of the test.
|
|
virtual Test * | getChildTestAt (int index) const |
| Returns the child test of the specified index.
|
|
virtual std::string | getName () const =0 |
| Returns the test name.
|
|
virtual bool | findTestPath (const std::string &testName, TestPath &testPath) const |
| Finds the test with the specified name and its parents test.
|
|
virtual bool | findTestPath (const Test *test, TestPath &testPath) const |
| Finds the specified test and its parents test.
|
|
virtual Test * | findTest (const std::string &testName) const |
| Finds the test with the specified name in the hierarchy.
|
|
virtual TestPath | resolveTestPath (const std::string &testPath) const |
| Resolved the specified test path with this test acting as 'root'.
|
|
virtual | ~TestFixture () |
|
virtual void | setUp () |
| Set up context before running a test.
|
|
virtual void | tearDown () |
| Clean up after the test run.
|
|
template<class ExpectedException>
class ExceptionTestCaseDecorator< ExpectedException >
Expected exception test case decorator.
A decorator used to assert that a specific test case should throw an exception of a given type.
You should use this class only if you need to check the exception object state (that a specific cause is set for example). If you don't need to do that, you might consider using CPPUNIT_TEST_EXCEPTION() instead.
Intended use is to subclass and override checkException(). Example:
class NetworkErrorTestCaseDecorator :
{
public:
NetworkErrorTestCaseDecorator( NetworkError::Cause expectedCause )
: m_expectedCause( expectedCause )
{
}
private:
void checkException( ExpectedExceptionType &e )
{
}
NetworkError::Cause m_expectedCause;
};
Expected exception test case decorator.
Definition ExceptionTestCaseDecorator.h:45
#define CPPUNIT_ASSERT_EQUAL(expected, actual)
Asserts that two values are equals.
Definition TestAssert.h:332