Go to the documentation of this file.    1 #ifndef CPPUNIT_TESTCALLER_H    // -*- C++ -*- 
    2 #define CPPUNIT_TESTCALLER_H 
   10 #if defined(CPPUNIT_USE_TYPEINFO_NAME) 
   25   NoExceptionExpected();
 
   33 template<
class ExceptionType>
 
   34 struct ExpectedExceptionTraits
 
   36   static void expectedException()
 
   38 #if defined(CPPUNIT_USE_TYPEINFO_NAME) 
   40                          "expected exception not thrown",
 
   41                          "Expected exception type: " + 
 
   44     throw Exception( 
"expected exception not thrown" );
 
   56 struct ExpectedExceptionTraits<NoExceptionExpected>
 
   58   static void expectedException()
 
  105 template <
class Fixture>
 
  159   TestCaller(std::string name, std::function<
void()> test_function, Fixture* fixture):
 
  190         return "TestCaller " + 
getName(); 
 
  207 #endif // CPPUNIT_TESTCALLER_H 
 
#define CPPUNIT_API
Definition: CppUnitApi.h:27
TestCaller & operator=(const TestCaller &other)
std::function< void()> m_test_function
Definition: TestCaller.h:200
Fixture * m_fixture
Definition: TestCaller.h:199
void setUp()
Set up context before running a test.
Definition: TestCaller.h:178
bool m_ownFixture
Definition: TestCaller.h:198
Exceptions thrown by failed assertions.
Definition: Exception.h:20
Message associated to an Exception.
Definition: Message.h:35
void(Fixture::* TestMethod)()
Definition: TestCaller.h:108
std::string getName() const
Returns the name of the test case.
Definition: TestCase.cpp:131
std::string toString() const
Definition: TestCaller.h:188
void tearDown()
Clean up after the test run.
Definition: TestCaller.h:183
static std::string getClassName(const std::type_info &info)
Get the class name of the specified type_info.
Definition: TypeInfoHelper.cpp:15
TestCaller(std::string name, TestMethod test)
Definition: TestCaller.h:117
TestCaller(std::string name, TestMethod test, Fixture *fixture)
Definition: TestCaller.h:151
Generate a test case from a fixture method.
Definition: TestCaller.h:107
A single test object.
Definition: TestCase.h:29
TestCaller(std::string name, std::function< void()> test_function, Fixture *fixture)
Definition: TestCaller.h:159
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:105
#define CPPUNIT_NS_END
Definition: Portability.h:106
TestCaller(std::string name, TestMethod test, Fixture &fixture)
Definition: TestCaller.h:134
TestCaller(const TestCaller &other)
void runTest()
FIXME: this should probably be pure virtual.
Definition: TestCaller.h:173
~TestCaller()
Definition: TestCaller.h:167