1 #ifndef CPPUNIT_TESTCALLER_H // -*- C++ -*-
2 #define CPPUNIT_TESTCALLER_H
8 #if CPPUNIT_USE_TYPEINFO_NAME
23 NoExceptionExpected();
31 template<
class ExceptionType>
32 struct ExpectedExceptionTraits
34 static void expectedException()
36 #if CPPUNIT_USE_TYPEINFO_NAME
38 "expected exception not thrown",
39 "Expected exception type: " +
40 TypeInfoHelper::getClassName(
typeid( ExceptionType ) ) ) );
42 throw Exception(
"expected exception not thrown" );
54 struct ExpectedExceptionTraits<NoExceptionExpected>
56 static void expectedException()
103 template <
class Fixture>
187 return "TestCaller " +
getName();
204 #endif // CPPUNIT_TESTCALLER_H
Exceptions thrown by failed assertions.Exception is an exception that serves descriptive strings thro...
Definition: Exception.h:19
Fixture * m_fixture
Definition: TestCaller.h:196
void runTest()
FIXME: this should probably be pure virtual.
Definition: TestCaller.h:163
TestCaller & operator=(const TestCaller &other)
std::string getName() const
Returns the name of the test case.
Definition: TestCase.cpp:131
void tearDown()
Clean up after the test run.
Definition: TestCaller.h:180
TestCaller(std::string name, TestMethod test, Fixture *fixture)
Definition: TestCaller.h:149
Generate a test case from a fixture method.A test caller provides access to a test case method on a t...
Definition: TestCaller.h:104
void(Fixture::* TestMethod)()
Definition: TestCaller.h:106
void setUp()
Set up context before running a test.
Definition: TestCaller.h:175
TestCaller(std::string name, TestMethod test, Fixture &fixture)
Definition: TestCaller.h:132
bool m_ownFixture
Definition: TestCaller.h:195
#define CPPUNIT_NS_END
Definition: Portability.h:120
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
~TestCaller()
Definition: TestCaller.h:157
TestMethod m_test
Definition: TestCaller.h:197
Message associated to an Exception.A message is composed of two items:
Definition: Message.h:38
TestCaller(std::string name, TestMethod test)
Definition: TestCaller.h:115
A single test object.
Definition: TestCase.h:27
std::string toString() const
Definition: TestCaller.h:185
#define CPPUNIT_API
Definition: CppUnitApi.h:27