My Project
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 ()

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.

130{}

◆ 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

Member Function Documentation

◆ createSuite()

template<class S>
void CxxTest::DynamicSuiteDescription< S >::createSuite ( )
inlineprivate

Definition at line 160 of file RealDescriptions.h.

◆ destroySuite()

template<class S>
void CxxTest::DynamicSuiteDescription< S >::destroySuite ( )
inlineprivate

Definition at line 165 of file RealDescriptions.h.

166 {
167 S *s = realSuite();
168 setSuite( 0 );
170 }

◆ 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.

144 {
148 _suite = &argSuite;
149 }
void initialize(const char *argFile, unsigned argLine, const char *argSuiteName, List &argTests, unsigned argCreateLine, unsigned argDestroyLine)

◆ realSuite()

template<class S>
S * CxxTest::DynamicSuiteDescription< S >::realSuite ( ) const
inlineprivate

Definition at line 157 of file RealDescriptions.h.

157{ return *_suite; }

◆ setSuite()

template<class S>
void CxxTest::DynamicSuiteDescription< S >::setSuite ( S * s)
inlineprivate

Definition at line 158 of file RealDescriptions.h.

158{ *_suite = s; }

◆ setUp()

template<class S>
bool CxxTest::DynamicSuiteDescription< S >::setUp ( )
virtual

Implements CxxTest::Link.

Definition at line 176 of file RealDescriptions.h.

177 {
178 _TS_TRY {
179 _TSM_ASSERT_THROWS_NOTHING( file(), _createLine, "Exception thrown from createSuite()", createSuite() );
180 _TSM_ASSERT( file(), _createLine, "createSuite() failed", suite() != 0 );
181 }
182 _TS_CATCH_ABORT( { return false; } );
183
184 return (suite() != 0);
185 }
#define _TSM_ASSERT_THROWS_NOTHING(f, l, m, e)
Definition TestSuite.h:465
#define _TSM_ASSERT(f, l, m, e)
Definition TestSuite.h:242
#define _TS_CATCH_ABORT(b)
Definition TestSuite.h:216

◆ suite()

template<class S>
TestSuite * CxxTest::DynamicSuiteDescription< S >::suite ( ) const
inlinevirtual

Implements CxxTest::SuiteDescription.

Definition at line 151 of file RealDescriptions.h.

151{ return realSuite(); }

◆ tearDown()

template<class S>
bool CxxTest::DynamicSuiteDescription< S >::tearDown ( )
virtual

Implements CxxTest::Link.

Definition at line 188 of file RealDescriptions.h.

189 {
190 if ( !_suite )
191 return true;
192
193 _TS_TRY {
194 _TSM_ASSERT_THROWS_NOTHING( file(), _destroyLine, "destroySuite() failed", destroySuite() );
195 }
196 _TS_CATCH_ABORT( { return false; } );
197
198 return true;
199 }

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: