CppUnit project page FAQ CppUnit home page

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

CppUnit::TestSuiteBuilder< Fixture > Class Template Reference
[Writing test fixture]

Helper to add tests to a TestSuite. More...

#include <TestSuiteBuilder.h>

List of all members.

Public Types

typedef void(Fixture::* TestMethod )()

Public Member Functions

 TestSuiteBuilder (TestSuite *suite)
 TestSuiteBuilder (std::string name)
TestSuite * suite () const
TestSuite * takeSuite ()
void addTest (Test *test)
void addTestCaller (std::string methodName, TestMethod testMethod)
void addTestCaller (std::string methodName, TestMethod testMethod, Fixture *fixture)
template<typename ExceptionType> void addTestCallerForException (std::string methodName, TestMethod testMethod, Fixture *fixture, ExceptionType *dummyPointer)
std::string makeTestName (const std::string &methodName)

Private Attributes

std::auto_ptr< TestSuite > m_suite


Detailed Description

template<typename Fixture>
class CppUnit::TestSuiteBuilder< Fixture >

Helper to add tests to a TestSuite.

All tests added to the TestSuite are prefixed by TestSuite name. The resulting TestCase name has the following pattern:

MyTestSuiteName.myTestName


Member Typedef Documentation

template<typename Fixture>
typedef void(Fixture::* CppUnit::TestSuiteBuilder< Fixture >::TestMethod)()
 


Constructor & Destructor Documentation

template<typename Fixture>
CppUnit::TestSuiteBuilder< Fixture >::TestSuiteBuilder (  TestSuite *  suite  )  [inline]
 

template<typename Fixture>
CppUnit::TestSuiteBuilder< Fixture >::TestSuiteBuilder (  std::string  name  )  [inline]
 


Member Function Documentation

template<typename Fixture>
void CppUnit::TestSuiteBuilder< Fixture >::addTest (  Test *  test  )  [inline]
 

template<typename Fixture>
void CppUnit::TestSuiteBuilder< Fixture >::addTestCaller (  std::string  methodName,
TestMethod  testMethod,
Fixture *  fixture
)  [inline]
 

template<typename Fixture>
void CppUnit::TestSuiteBuilder< Fixture >::addTestCaller (  std::string  methodName,
TestMethod  testMethod
)  [inline]
 

template<typename Fixture>
template<typename ExceptionType>
void CppUnit::TestSuiteBuilder< Fixture >::addTestCallerForException (  std::string  methodName,
TestMethod  testMethod,
Fixture *  fixture,
ExceptionType *  dummyPointer
)  [inline]
 

template<typename Fixture>
std::string CppUnit::TestSuiteBuilder< Fixture >::makeTestName (  const std::string &  methodName  )  [inline]
 

template<typename Fixture>
TestSuite* CppUnit::TestSuiteBuilder< Fixture >::suite (   )  const [inline]
 

template<typename Fixture>
TestSuite* CppUnit::TestSuiteBuilder< Fixture >::takeSuite (   )  [inline]
 


Member Data Documentation

template<typename Fixture>
std::auto_ptr<TestSuite> CppUnit::TestSuiteBuilder< Fixture >::m_suite [private]
 


The documentation for this class was generated from the following file:
SourceForge Logo hosts this site. Send comments to:
CppUnit Developers