Loading...
Searching...
No Matches
CxxTest::DynamicSuiteDescription< S > Class Template Reference

`#include <RealDescriptions.h>`

## Public Member Functions

| DynamicSuiteDescription ()
| DynamicSuiteDescription (const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests, S *&argSuite, unsigned argCreateLine, unsigned argDestroyLine)
void | initialize (const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests, S *&argSuite, unsigned argCreateLine, unsigned argDestroyLine)
TestSuite * | suite () const
bool | setUp ()
bool | tearDown ()
Public Member Functions inherited from CxxTest::CommonDynamicSuiteDescription
| CommonDynamicSuiteDescription ()
| CommonDynamicSuiteDescription (const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests, unsigned argCreateLine, unsigned argDestroyLine)
void | initialize (const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests, unsigned argCreateLine, unsigned argDestroyLine)
Public Member Functions inherited from CxxTest::RealSuiteDescription
| RealSuiteDescription ()
| RealSuiteDescription (const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests)
void | initialize (const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests)
const char * | file () const
unsigned | line () const
const char * | suiteName () const
TestDescription * | firstTest ()
const TestDescription * | firstTest () const
SuiteDescription * | next ()
const SuiteDescription * | next () const
unsigned | numTests () const
const TestDescription & | testDescription (unsigned i) const
void | activateAllTests ()
bool | leaveOnly (const char *testName)
Public Member Functions inherited from CxxTest::SuiteDescription
virtual | ~SuiteDescription ()
Public Member Functions inherited from CxxTest::Link
| Link ()
virtual | ~Link ()
bool | active () const
void | setActive (bool value=true)
Link * | justNext ()
Link * | justPrev ()
Link * | next ()
Link * | prev ()
const Link * | next () const
const Link * | prev () const
void | attach (List &l)
void | detach (List &l)

## Private Member Functions

S * | realSuite () const
void | setSuite (S *s)
void | createSuite ()
void | destroySuite ()

## Private Attributes

S ** | _suite

## Additional Inherited Members

Protected Attributes inherited from CxxTest::CommonDynamicSuiteDescription
unsigned | _createLine
unsigned | _destroyLine

## Detailed Description

template<class S>
class CxxTest::DynamicSuiteDescription< S >

Definition at line 127 of file RealDescriptions.h.

## Constructor & Destructor Documentation

## DynamicSuiteDescription() [1/2]

template<class S>

CxxTest::DynamicSuiteDescription< S >::DynamicSuiteDescription | ( |  | ) |

inline

Definition at line 130 of file RealDescriptions.h.

{}

## DynamicSuiteDescription() [2/2]

template<class S>

CxxTest::DynamicSuiteDescription< S >::DynamicSuiteDescription | ( | const char * | argFile,
|  | unsigned | argLine,
|  | const char * | argSuiteName,
|  | List & | argTests,
|  | S *& | argSuite,
|  | unsigned | argCreateLine,
|  | unsigned | argDestroyLine )

inline

Definition at line 131 of file RealDescriptions.h.

:
CommonDynamicSuiteDescription( argFile, argLine, argSuiteName, argTests, argCreateLine, argDestroyLine )
{
_suite = &argSuite;
}
CxxTest::CommonDynamicSuiteDescription::CommonDynamicSuiteDescription
CommonDynamicSuiteDescription()
Definition RealDescriptions.cpp:185
CxxTest::DynamicSuiteDescription
Definition RealDescriptions.h:128
CxxTest::DynamicSuiteDescription::_suite
S ** _suite
Definition RealDescriptions.h:172

## Member Function Documentation

## createSuite()

template<class S>

void CxxTest::DynamicSuiteDescription< S >::createSuite | ( |  | ) |

inline private

Definition at line 160 of file RealDescriptions.h.

{
setSuite( S::createSuite() );
}
CxxTest::DynamicSuiteDescription::setSuite
void setSuite(S *s)
Definition RealDescriptions.h:158

## destroySuite()

template<class S>

void CxxTest::DynamicSuiteDescription< S >::destroySuite | ( |  | ) |

inline private

Definition at line 165 of file RealDescriptions.h.

{
S *s = realSuite();
setSuite( 0 );
S::destroySuite( s );
}
CxxTest::DynamicSuiteDescription::realSuite
S * realSuite() const
Definition RealDescriptions.h:157

## initialize()

template<class S>

void CxxTest::DynamicSuiteDescription< S >::initialize | ( | const char * | argFile,
|  | unsigned | argLine,
|  | const char * | argSuiteName,
|  | List & | argTests,
|  | S *& | argSuite,
|  | unsigned | argCreateLine,
|  | unsigned | argDestroyLine )

inline

Definition at line 140 of file RealDescriptions.h.

{
CommonDynamicSuiteDescription::initialize( argFile, argLine,
argSuiteName, argTests,
argCreateLine, argDestroyLine );
_suite = &argSuite;
}
CxxTest::CommonDynamicSuiteDescription::initialize
void initialize(const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests, unsigned argCreateLine, unsigned argDestroyLine)
Definition RealDescriptions.cpp:194

## realSuite()

template<class S>

S * CxxTest::DynamicSuiteDescription< S >::realSuite | ( |  | ) | const

inline private

Definition at line 157 of file RealDescriptions.h.

{ return *_suite; }

## setSuite()

template<class S>

void CxxTest::DynamicSuiteDescription< S >::setSuite | ( | S * | s | ) |

inline private

Definition at line 158 of file RealDescriptions.h.

{ *_suite = s; }

## setUp()

template<class S>

bool CxxTest::DynamicSuiteDescription< S >::setUp | ( |  | ) |

virtual

Implements CxxTest::Link.

Definition at line 176 of file RealDescriptions.h.

{
_TS_TRY {
_TSM_ASSERT_THROWS_NOTHING( file(), _createLine, "Exception thrown from createSuite()", createSuite() );
_TSM_ASSERT( file(), _createLine, "createSuite() failed", suite() != 0 );
}
_TS_CATCH_ABORT( { return false; } );
return (suite() != 0);
}
_TSM_ASSERT_THROWS_NOTHING
#define _TSM_ASSERT_THROWS_NOTHING(f, l, m, e)
Definition TestSuite.h:465
_TSM_ASSERT
#define _TSM_ASSERT(f, l, m, e)
Definition TestSuite.h:242
_TS_CATCH_ABORT
#define _TS_CATCH_ABORT(b)
Definition TestSuite.h:216
CxxTest::CommonDynamicSuiteDescription::_createLine
unsigned _createLine
Definition RealDescriptions.h:120
CxxTest::DynamicSuiteDescription::suite
TestSuite * suite() const
Definition RealDescriptions.h:151
CxxTest::DynamicSuiteDescription::createSuite
void createSuite()
Definition RealDescriptions.h:160
CxxTest::RealSuiteDescription::file
const char * file() const
Definition RealDescriptions.cpp:123

## suite()

template<class S>

TestSuite * CxxTest::DynamicSuiteDescription< S >::suite | ( |  | ) | const

inline virtual

Implements CxxTest::SuiteDescription.

Definition at line 151 of file RealDescriptions.h.

{ return realSuite(); }

## tearDown()

template<class S>

bool CxxTest::DynamicSuiteDescription< S >::tearDown | ( |  | ) |

virtual

Implements CxxTest::Link.

Definition at line 188 of file RealDescriptions.h.

{
if ( !_suite )
return true;
_TS_TRY {
_TSM_ASSERT_THROWS_NOTHING( file(), _destroyLine, "destroySuite() failed", destroySuite() );
}
_TS_CATCH_ABORT( { return false; } );
return true;
}
CxxTest::CommonDynamicSuiteDescription::_destroyLine
unsigned _destroyLine
Definition RealDescriptions.h:120
CxxTest::DynamicSuiteDescription::destroySuite
void destroySuite()
Definition RealDescriptions.h:165

## Field Documentation

## _suite

template<class S>

S** CxxTest::DynamicSuiteDescription< S >::_suite

private

Definition at line 172 of file RealDescriptions.h.

The documentation for this class was generated from the following file:

- libpolys/tests/cxxtest/RealDescriptions.h