1#ifndef CPPUNIT_TESTCALLER_H
2#define CPPUNIT_TESTCALLER_H
8#if CPPUNIT_USE_TYPEINFO_NAME
23 NoExceptionExpected();
31template<
class ExceptionType>
32struct ExpectedExceptionTraits
34 static void expectedException()
36#if CPPUNIT_USE_TYPEINFO_NAME
37 throw Exception( Message(
38 "expected exception not thrown",
39 "Expected exception type: " +
40 TypeInfoHelper::getClassName(
typeid( ExceptionType ) ) ) );
42 throw Exception(
"expected exception not thrown" );
54struct ExpectedExceptionTraits<NoExceptionExpected>
56 static void expectedException()
103template <
class Fixture>
187 return "TestCaller " +
getName();
#define CPPUNIT_API
Definition CppUnitApi.h:27
#define CPPUNIT_NS_END
Definition Portability.h:120
#define CPPUNIT_NS_BEGIN
Definition Portability.h:119
void tearDown()
Clean up after the test run.
Definition TestCaller.h:180
TestCaller(std::string name, TestMethod test, Fixture &fixture)
Definition TestCaller.h:132
std::string toString() const
Definition TestCaller.h:185
void(Fixture::* TestMethod)()
Definition TestCaller.h:106
Fixture * m_fixture
Definition TestCaller.h:196
TestCaller(std::string name, TestMethod test, Fixture *fixture)
Definition TestCaller.h:149
TestCaller & operator=(const TestCaller &other)
~TestCaller()
Definition TestCaller.h:157
TestCaller(std::string name, TestMethod test)
Definition TestCaller.h:115
bool m_ownFixture
Definition TestCaller.h:195
TestMethod m_test
Definition TestCaller.h:197
void runTest()
FIXME: this should probably be pure virtual.
Definition TestCaller.h:163
void setUp()
Set up context before running a test.
Definition TestCaller.h:175
TestCaller(const TestCaller &other)
std::string getName() const
Returns the name of the test case.
Definition TestCase.cpp:131
TestCase(const std::string &name)
Constructs a test case.
Definition TestCase.cpp:45