My Project
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends
CxxTest::RealSuiteDescription Class Reference

#include <RealDescriptions.h>

Public Member Functions

 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
 
TestDescriptionfirstTest ()
 
const TestDescriptionfirstTest () const
 
SuiteDescriptionnext ()
 
const SuiteDescriptionnext () const
 
unsigned numTests () const
 
const TestDescriptiontestDescription (unsigned i) const
 
void activateAllTests ()
 
bool leaveOnly (const char *testName)
 
- Public Member Functions inherited from CxxTest::SuiteDescription
virtual ~SuiteDescription ()
 
virtual const char * file () const =0
 
virtual unsigned line () const =0
 
virtual const char * suiteName () const =0
 
virtual TestSuitesuite () const =0
 
virtual unsigned numTests () const =0
 
virtual const TestDescriptiontestDescription (unsigned) const =0
 
virtual TestDescriptionfirstTest ()=0
 
virtual const TestDescriptionfirstTest () const =0
 
virtual SuiteDescriptionnext ()=0
 
virtual const SuiteDescriptionnext () const =0
 
virtual void activateAllTests ()=0
 
virtual bool leaveOnly (const char *)=0
 

Private Member Functions

 RealSuiteDescription (const RealSuiteDescription &)
 
RealSuiteDescriptionoperator= (const RealSuiteDescription &)
 

Private Attributes

const char * _file
 
unsigned _line
 
const char * _suiteName
 
List_tests
 
STATIC_INST_VAR List _suites = { 0, 0 }
 

Friends

class RealWorldDescription
 

Detailed Description

Definition at line 46 of file RealDescriptions.h.

Constructor & Destructor Documentation

◆ RealSuiteDescription() [1/3]

CxxTest::RealSuiteDescription::RealSuiteDescription ( )

Definition at line 101 of file RealDescriptions.cpp.

101{}

◆ RealSuiteDescription() [2/3]

CxxTest::RealSuiteDescription::RealSuiteDescription ( const char *  argFile,
unsigned  argLine,
const char *  argSuiteName,
List argTests 
)

Definition at line 102 of file RealDescriptions.cpp.

106 {
107 initialize( argFile, argLine, argSuiteName, argTests );
108 }
void initialize()

◆ RealSuiteDescription() [3/3]

CxxTest::RealSuiteDescription::RealSuiteDescription ( const RealSuiteDescription )
private

Member Function Documentation

◆ activateAllTests()

void CxxTest::RealSuiteDescription::activateAllTests ( )
virtual

Implements CxxTest::SuiteDescription.

Definition at line 139 of file RealDescriptions.cpp.

140 {
142 }
void activateAll()
Definition: LinkedList.cpp:69

◆ file()

const char * CxxTest::RealSuiteDescription::file ( ) const
virtual

Implements CxxTest::SuiteDescription.

Definition at line 123 of file RealDescriptions.cpp.

123{ return _file; }

◆ firstTest() [1/2]

TestDescription * CxxTest::RealSuiteDescription::firstTest ( )
virtual

Implements CxxTest::SuiteDescription.

Definition at line 127 of file RealDescriptions.cpp.

127{ return (RealTestDescription *)_tests->head(); }
Link * head()
Definition: LinkedList.cpp:16

◆ firstTest() [2/2]

const TestDescription * CxxTest::RealSuiteDescription::firstTest ( ) const
virtual

Implements CxxTest::SuiteDescription.

Definition at line 128 of file RealDescriptions.cpp.

128{ return (const RealTestDescription *)_tests->head(); }

◆ initialize()

void CxxTest::RealSuiteDescription::initialize ( const char *  argFile,
unsigned  argLine,
const char *  argSuiteName,
List argTests 
)

Definition at line 110 of file RealDescriptions.cpp.

114 {
115 _file = argFile;
116 _line = argLine;
117 _suiteName = argSuiteName;
118 _tests = &argTests;
119
120 attach( _suites );
121 }
STATIC_INST_VAR List _suites

◆ leaveOnly()

bool CxxTest::RealSuiteDescription::leaveOnly ( const char *  testName)
virtual

Implements CxxTest::SuiteDescription.

Definition at line 144 of file RealDescriptions.cpp.

145 {
146 for ( TestDescription *td = firstTest(); td != 0; td = td->next() ) {
147 if ( stringsEqual( td->testName(), testName ) ) {
148 _tests->leaveOnly( *td );
149 return true;
150 }
151 }
152 return false;
153 }
virtual const TestDescription * next() const =0
bool stringsEqual(const char *s1, const char *s2)
Definition: ValueTraits.cpp:39
void leaveOnly(const Link &link)
Definition: LinkedList.cpp:75

◆ line()

unsigned CxxTest::RealSuiteDescription::line ( ) const
virtual

Implements CxxTest::SuiteDescription.

Definition at line 124 of file RealDescriptions.cpp.

124{ return _line; }

◆ next() [1/2]

SuiteDescription * CxxTest::RealSuiteDescription::next ( )
virtual

Implements CxxTest::SuiteDescription.

Definition at line 129 of file RealDescriptions.cpp.

◆ next() [2/2]

const SuiteDescription * CxxTest::RealSuiteDescription::next ( ) const
virtual

Implements CxxTest::SuiteDescription.

Definition at line 130 of file RealDescriptions.cpp.

130{ return (const RealSuiteDescription *)Link::next(); }

◆ numTests()

unsigned CxxTest::RealSuiteDescription::numTests ( ) const
virtual

Implements CxxTest::SuiteDescription.

Definition at line 132 of file RealDescriptions.cpp.

132{ return _tests->size(); }
unsigned size() const
Definition: LinkedList.cpp:53

◆ operator=()

RealSuiteDescription & CxxTest::RealSuiteDescription::operator= ( const RealSuiteDescription )
private

◆ suiteName()

const char * CxxTest::RealSuiteDescription::suiteName ( ) const
virtual

Implements CxxTest::SuiteDescription.

Definition at line 125 of file RealDescriptions.cpp.

125{ return _suiteName; }

◆ testDescription()

const TestDescription & CxxTest::RealSuiteDescription::testDescription ( unsigned  i) const
virtual

Implements CxxTest::SuiteDescription.

Definition at line 134 of file RealDescriptions.cpp.

135 {
136 return *(RealTestDescription *)_tests->nth( i );
137 }
int i
Definition: cfEzgcd.cc:132
Link * nth(unsigned n)
Definition: LinkedList.cpp:61

Friends And Related Function Documentation

◆ RealWorldDescription

friend class RealWorldDescription
friend

Definition at line 79 of file RealDescriptions.h.

Field Documentation

◆ _file

const char* CxxTest::RealSuiteDescription::_file
private

Definition at line 73 of file RealDescriptions.h.

◆ _line

unsigned CxxTest::RealSuiteDescription::_line
private

Definition at line 74 of file RealDescriptions.h.

◆ _suiteName

const char* CxxTest::RealSuiteDescription::_suiteName
private

Definition at line 75 of file RealDescriptions.h.

◆ _suites

List CxxTest::RealSuiteDescription::_suites = { 0, 0 }
private

Definition at line 78 of file RealDescriptions.h.

◆ _tests

List* CxxTest::RealSuiteDescription::_tests
private

Definition at line 76 of file RealDescriptions.h.


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