Loading...
Searching...
No Matches
CxxTest::RealWorldDescription Class Reference

`#include <RealDescriptions.h>`

## Public Member Functions

unsigned | numSuites (void) const
unsigned | numTotalTests (void) const
SuiteDescription * | firstSuite ()
const SuiteDescription * | firstSuite () const
const SuiteDescription & | suiteDescription (unsigned i) const
void | activateAllTests ()
bool | leaveOnly (const char *suiteName, const char *testName=0)
bool | setUp ()
bool | tearDown ()
Public Member Functions inherited from CxxTest::WorldDescription
virtual | ~WorldDescription ()
char * | strTotalTests (char *) const
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)

## Static Public Member Functions

static List & | suites ()
static void | reportError (const char *message)

## Additional Inherited Members

Public Types inherited from CxxTest::WorldDescription
enum | { MAX_STRLEN_TOTAL_TESTS = 32 }

## Detailed Description

Definition at line 201 of file RealDescriptions.h.

## Member Function Documentation

## activateAllTests()

void CxxTest::RealWorldDescription::activateAllTests | ( |  | ) |

virtual

Implements CxxTest::WorldDescription.

Definition at line 241 of file RealDescriptions.cpp.

{
suites().activateAll();
for ( SuiteDescription *sd = firstSuite(); sd != 0; sd = sd->next() )
sd->activateAllTests();
}
CxxTest::RealWorldDescription::suites
static List & suites()
Definition RealDescriptions.cpp:208
CxxTest::RealWorldDescription::firstSuite
SuiteDescription * firstSuite()
Definition RealDescriptions.cpp:226
CxxTest::SuiteDescription::next
virtual SuiteDescription * next()=0
CxxTest::List::activateAll
void activateAll()
Definition LinkedList.cpp:69

## firstSuite() [1/2]

SuiteDescription * CxxTest::RealWorldDescription::firstSuite | ( |  | ) |

virtual

Implements CxxTest::WorldDescription.

Definition at line 226 of file RealDescriptions.cpp.

{
return (RealSuiteDescription *)suites().head();
}
CxxTest::List::head
Link * head()
Definition LinkedList.cpp:16

## firstSuite() [2/2]

const SuiteDescription * CxxTest::RealWorldDescription::firstSuite | ( |  | ) | const

virtual

Implements CxxTest::WorldDescription.

Definition at line 231 of file RealDescriptions.cpp.

{
return (const RealSuiteDescription *)suites().head();
}

## leaveOnly()

bool CxxTest::RealWorldDescription::leaveOnly | ( | const char * | suiteName,
|  | const char * | testName = 0 )

virtual

Implements CxxTest::WorldDescription.

Definition at line 248 of file RealDescriptions.cpp.

{
for ( SuiteDescription *sd = firstSuite(); sd != 0; sd = sd->next() ) {
if ( stringsEqual( sd->suiteName(), suiteName ) ) {
if ( testName )
if ( !sd->leaveOnly( testName ) )
return false;
suites().leaveOnly( *sd );
return true;
}
}
return false;
}
CxxTest::stringsEqual
bool stringsEqual(const char *s1, const char *s2)
Definition ValueTraits.cpp:39
CxxTest::List::leaveOnly
void leaveOnly(const Link &link)
Definition LinkedList.cpp:75

## numSuites()

unsigned CxxTest::RealWorldDescription::numSuites | ( | void |  | ) | const

virtual

Implements CxxTest::WorldDescription.

Definition at line 213 of file RealDescriptions.cpp.

{
return suites().size();
}
CxxTest::List::size
unsigned size() const
Definition LinkedList.cpp:53

## numTotalTests()

unsigned CxxTest::RealWorldDescription::numTotalTests | ( | void |  | ) | const

virtual

Implements CxxTest::WorldDescription.

Definition at line 218 of file RealDescriptions.cpp.

{
unsigned count = 0;
for ( const SuiteDescription *sd = firstSuite(); sd != 0; sd = sd->next() )
count += sd->numTests();
return count;
}
count
int status int void size_t count
Definition si_signals.h:69

## reportError()

void CxxTest::RealWorldDescription::reportError | ( | const char * | message | ) |

static

Definition at line 294 of file RealDescriptions.cpp.

{
doWarn( __FILE__, 5, message );
}
message
void message(int i, int *olddeg, int *reduc, kStrategy strat, int red_result)
Definition kutil.cc:7463
CxxTest::doWarn
void doWarn(const char *file, unsigned line, const char *message)
Definition TestSuite.cpp:61

## setUp()

bool CxxTest::RealWorldDescription::setUp | ( |  | ) |

virtual

Implements CxxTest::Link.

Definition at line 262 of file RealDescriptions.cpp.

{
for ( GlobalFixture *gf = GlobalFixture::firstGlobalFixture(); gf != 0; gf = gf->nextGlobalFixture() ) {
bool ok;
_TS_TRY { ok = gf->setUpWorld(); }
_TS_LAST_CATCH( { ok = false; } );
if ( !ok ) {
reportError( "Error setting up world" );
return false;
}
}
return true;
}
_TS_TRY
#define _TS_TRY
Definition TestSuite.h:209
_TS_LAST_CATCH
#define _TS_LAST_CATCH(b)
Definition TestSuite.h:215
CxxTest::GlobalFixture::nextGlobalFixture
GlobalFixture * nextGlobalFixture()
Definition GlobalFixture.cpp:18
CxxTest::GlobalFixture::firstGlobalFixture
static GlobalFixture * firstGlobalFixture()
Definition GlobalFixture.cpp:16
CxxTest::RealWorldDescription::reportError
static void reportError(const char *message)
Definition RealDescriptions.cpp:294

## suiteDescription()

const SuiteDescription & CxxTest::RealWorldDescription::suiteDescription | ( | unsigned | i | ) | const

virtual

Implements CxxTest::WorldDescription.

Definition at line 236 of file RealDescriptions.cpp.

{
return *(const RealSuiteDescription *)suites().nth( i );
}
i
int i
Definition cfEzgcd.cc:132
CxxTest::List::nth
Link * nth(unsigned n)
Definition LinkedList.cpp:61

## suites()

List & CxxTest::RealWorldDescription::suites | ( |  | ) |

static

Definition at line 208 of file RealDescriptions.cpp.

{
return RealSuiteDescription::_suites;
}
CxxTest::RealSuiteDescription::_suites
STATIC_INST_VAR List _suites
Definition RealDescriptions.h:78

## tearDown()

bool CxxTest::RealWorldDescription::tearDown | ( |  | ) |

virtual

Implements CxxTest::Link.

Definition at line 278 of file RealDescriptions.cpp.

{
for ( GlobalFixture *gf = GlobalFixture::lastGlobalFixture(); gf != 0; gf = gf->prevGlobalFixture() ) {
bool ok;
_TS_TRY { ok = gf->tearDownWorld(); }
_TS_LAST_CATCH( { ok = false; } );
if ( !ok ) {
reportError( "Error tearing down world" );
return false;
}
}
return true;
}
CxxTest::GlobalFixture::prevGlobalFixture
GlobalFixture * prevGlobalFixture()
Definition GlobalFixture.cpp:19
CxxTest::GlobalFixture::lastGlobalFixture
static GlobalFixture * lastGlobalFixture()
Definition GlobalFixture.cpp:17

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

- libpolys/tests/cxxtest/RealDescriptions.h
- libpolys/tests/cxxtest/RealDescriptions.cpp