Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages
CppUnit::TestCaller< Fixture, ExpectedException > Class Template Reference
[Writing test fixture]
Generate a test case from a fixture method.
More...
#include <TestCaller.h>
Inheritance diagram for CppUnit::TestCaller< Fixture, ExpectedException >:
[legend]Collaboration diagram for CppUnit::TestCaller< Fixture, ExpectedException >:
[legend]List of all members.
Detailed Description
template<typename Fixture, typename ExpectedException = NoExceptionExpected>
class CppUnit::TestCaller< Fixture, ExpectedException >
Generate a test case from a fixture method.
A test caller provides access to a test case method on a test fixture class. Test callers are useful when you want to run an individual test or add it to a suite. Test Callers invoke only one Test (i.e. test method) on one Fixture of a TestFixture.
Here is an example:
You can use a TestCaller to bind any test method on a TestFixture class, as long as it accepts void and returns void.
- See also:
-
TestCase
Member Typedef Documentation
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
typedef void(Fixture::* CppUnit::TestCaller< Fixture, ExpectedException >::TestMethod)() [private]
|
|
Constructor & Destructor Documentation
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
CppUnit::TestCaller< Fixture, ExpectedException >::TestCaller |
( |
std::string |
name, |
|
|
TestMethod |
test |
|
) |
[inline] |
|
|
Constructor for TestCaller. This constructor builds a new Fixture instance owned by the TestCaller. - Parameters:
-
|
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
CppUnit::TestCaller< Fixture, ExpectedException >::TestCaller |
( |
std::string |
name, |
|
|
TestMethod |
test, |
|
|
Fixture & |
fixture |
|
) |
[inline] |
|
|
Constructor for TestCaller. This constructor does not create a new Fixture instance but accepts an existing one as parameter. The TestCaller will not own the Fixture object. - Parameters:
-
|
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
CppUnit::TestCaller< Fixture, ExpectedException >::TestCaller |
( |
std::string |
name, |
|
|
TestMethod |
test, |
|
|
Fixture * |
fixture |
|
) |
[inline] |
|
|
Constructor for TestCaller. This constructor does not create a new Fixture instance but accepts an existing one as parameter. The TestCaller will own the Fixture object and delete it in its destructor. - Parameters:
-
|
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
CppUnit::TestCaller< Fixture, ExpectedException >::~TestCaller |
( |
|
) |
[inline] |
|
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
CppUnit::TestCaller< Fixture, ExpectedException >::TestCaller |
( |
const TestCaller< Fixture, ExpectedException > & |
other |
) |
[private] |
|
Member Function Documentation
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
TestCaller& CppUnit::TestCaller< Fixture, ExpectedException >::operator= |
( |
const TestCaller< Fixture, ExpectedException > & |
other |
) |
[private] |
|
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
void CppUnit::TestCaller< Fixture, ExpectedException >::runTest |
( |
|
) |
[inline, protected, virtual] |
|
|
All the work for runTest is deferred to subclasses.
Reimplemented from CppUnit::TestCase. |
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
void CppUnit::TestCaller< Fixture, ExpectedException >::setUp |
( |
|
) |
[inline, protected, virtual] |
|
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
void CppUnit::TestCaller< Fixture, ExpectedException >::tearDown |
( |
|
) |
[inline, protected, virtual] |
|
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
std::string CppUnit::TestCaller< Fixture, ExpectedException >::toString |
( |
|
) |
[inline, protected, virtual] |
|
Member Data Documentation
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
Fixture* CppUnit::TestCaller< Fixture, ExpectedException >::m_fixture [private]
|
|
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
bool CppUnit::TestCaller< Fixture, ExpectedException >::m_ownFixture [private]
|
|
template<typename Fixture, typename ExpectedException = NoExceptionExpected> |
TestMethod CppUnit::TestCaller< Fixture, ExpectedException >::m_test [private]
|
|
The documentation for this class was generated from the following file: