Loading...
Searching...
No Matches
CxxTest::RealTestDescription Class Referenceabstract

`#include <RealDescriptions.h>`

## Public Member Functions

| RealTestDescription ()
| RealTestDescription (List &argList, SuiteDescription &argSuite, unsigned argLine, const char *argTestName)
void | initialize (List &argList, SuiteDescription &argSuite, unsigned argLine, const char *argTestName)
const char * | file () const
unsigned | line () const
const char * | testName () const
const char * | suiteName () const
TestDescription * | next ()
const TestDescription * | next () const
TestSuite * | suite () const
bool | setUp ()
void | run ()
bool | tearDown ()
Public Member Functions inherited from CxxTest::TestDescription
virtual | ~TestDescription ()
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

| RealTestDescription (const RealTestDescription &)
RealTestDescription & | operator= (const RealTestDescription &)
virtual void | runTest ()=0

## Private Attributes

SuiteDescription * | _suite
unsigned | _line
const char * | _testName

## Detailed Description

Definition at line 14 of file RealDescriptions.h.

## Constructor & Destructor Documentation

## RealTestDescription() [1/3]

CxxTest::RealTestDescription::RealTestDescription | ( |  | ) |

Definition at line 13 of file RealDescriptions.cpp.

{
}

## RealTestDescription() [2/3]

CxxTest::RealTestDescription::RealTestDescription | ( | List & | argList,
|  | SuiteDescription & | argSuite,
|  | unsigned | argLine,
|  | const char * | argTestName )

Definition at line 17 of file RealDescriptions.cpp.

{
initialize( argList, argSuite, argLine, argTestName );
}
CxxTest::initialize
void initialize()

## RealTestDescription() [3/3]

CxxTest::RealTestDescription::RealTestDescription | ( | const RealTestDescription & |  | ) |

private

## Member Function Documentation

## file()

const char * CxxTest::RealTestDescription::file | ( |  | ) | const

virtual

Implements CxxTest::TestDescription.

Definition at line 84 of file RealDescriptions.cpp.

{ return _suite->file(); }
CxxTest::RealTestDescription::_suite
SuiteDescription * _suite
Definition RealDescriptions.h:41

## initialize()

void CxxTest::RealTestDescription::initialize | ( | List & | argList,
|  | SuiteDescription & | argSuite,
|  | unsigned | argLine,
|  | const char * | argTestName )

Definition at line 25 of file RealDescriptions.cpp.

{
_suite = &argSuite;
_line = argLine;
_testName = argTestName;
attach( argList );
}
CxxTest::Link::attach
void attach(List &l)
Definition LinkedList.cpp:145
CxxTest::RealTestDescription::_line
unsigned _line
Definition RealDescriptions.h:42
CxxTest::RealTestDescription::_testName
const char * _testName
Definition RealDescriptions.h:43

## line()

unsigned CxxTest::RealTestDescription::line | ( |  | ) | const

virtual

Implements CxxTest::TestDescription.

Definition at line 85 of file RealDescriptions.cpp.

{ return _line; }

## next() [1/2]

TestDescription * CxxTest::RealTestDescription::next | ( |  | ) |

virtual

Implements CxxTest::TestDescription.

Definition at line 89 of file RealDescriptions.cpp.

{ return (RealTestDescription *)Link::next(); }
CxxTest::Link::next
Link * next()
Definition LinkedList.cpp:113
CxxTest::RealTestDescription::RealTestDescription
RealTestDescription()
Definition RealDescriptions.cpp:13

## next() [2/2]

const TestDescription * CxxTest::RealTestDescription::next | ( |  | ) | const

virtual

Implements CxxTest::TestDescription.

Definition at line 90 of file RealDescriptions.cpp.

{ return (const RealTestDescription *)Link::next(); }

## operator=()

RealTestDescription & CxxTest::RealTestDescription::operator= | ( | const RealTestDescription & |  | ) |

private

## run()

void CxxTest::RealTestDescription::run | ( |  | ) |

virtual

Implements CxxTest::TestDescription.

Definition at line 94 of file RealDescriptions.cpp.

{
_TS_TRY { runTest(); }
_TS_CATCH_ABORT( {} )
___TSM_CATCH( file(), line(), "Exception thrown from test" );
}
_TS_TRY
#define _TS_TRY
Definition TestSuite.h:209
_TS_CATCH_ABORT
#define _TS_CATCH_ABORT(b)
Definition TestSuite.h:216
___TSM_CATCH
#define ___TSM_CATCH(f, l, m)
Definition TestSuite.h:210
CxxTest::RealTestDescription::file
const char * file() const
Definition RealDescriptions.cpp:84
CxxTest::RealTestDescription::runTest
virtual void runTest()=0
CxxTest::RealTestDescription::line
unsigned line() const
Definition RealDescriptions.cpp:85

## runTest()

virtual void CxxTest::RealTestDescription::runTest | ( |  | ) |

private pure virtual

Implemented in TestDescription_CoeffsTestSuite_test_GF, TestDescription_CoeffsTestSuite_test_GF_toobig, TestDescription_CoeffsTestSuite_test_LC, TestDescription_CoeffsTestSuite_test_LR, TestDescription_CoeffsTestSuite_test_Q, TestDescription_CoeffsTestSuite_test_Q_special, TestDescription_CoeffsTestSuite_test_R, TestDescription_CoeffsTestSuite_test_Z2m2, TestDescription_CoeffsTestSuite_test_Z2m4, TestDescription_CoeffsTestSuite_test_Z2m8, TestDescription_CoeffsTestSuite_test_Z, TestDescription_CoeffsTestSuite_test_Zn3, TestDescription_CoeffsTestSuite_test_Zp101, TestDescription_PolysTestSuite_test_Q_Ext_a, TestDescription_PolysTestSuite_test_Q_Ext_b, TestDescription_PolysTestSuite_test_Q_Ext_Performance, TestDescription_PolysTestSuite_test_Q_Ext_s_t, TestDescription_PolysTestSuite_test_Q_Ext_s_t_NestedFractions, TestDescription_PolysTestSuite_test_QQ_t, TestDescription_PolysTestSuite_test_QQ_t, TestDescription_PolysTestSuite_test_QQ_x_y_z, TestDescription_PolysTestSuite_test_QQ_x_y_z, TestDescription_PolysTestSuite_test_QQ_x_y_z_ord_2_lp, TestDescription_PolysTestSuite_test_Z11_x_y_z, TestDescription_PolysTestSuite_test_Z11_x_y_z, TestDescription_PolysTestSuite_test_Z13_t, TestDescription_PolysTestSuite_test_Z13_t, TestDescription_PolysTestSuite_test_Z13_t_GF, TestDescription_PolysTestSuite_test_Z13_t_GF, TestDescription_PolysTestSuite_test_Z_17_Ext_a, TestDescription_SimplestTestSuite_testMyTest, and TestDescription_SimplestTestSuite_testSIZEOFLONG.

## setUp()

bool CxxTest::RealTestDescription::setUp | ( |  | ) |

virtual

Implements CxxTest::Link.

Definition at line 36 of file RealDescriptions.cpp.

{
if ( !suite() )
return false;
for ( GlobalFixture *gf = GlobalFixture::firstGlobalFixture(); gf != 0; gf = gf->nextGlobalFixture() ) {
bool ok;
_TS_TRY { ok = gf->setUp(); }
_TS_LAST_CATCH( { ok = false; } );
if ( !ok ) {
doFailTest( file(), line(), "Error in GlobalFixture::setUp()" );
return false;
}
}
_TS_TRY {
_TSM_ASSERT_THROWS_NOTHING( file(), line(), "Exception thrown from setUp()", suite()->setUp() );
}
_TS_CATCH_ABORT( { return false; } );
return true;
}
_TS_LAST_CATCH
#define _TS_LAST_CATCH(b)
Definition TestSuite.h:215
_TSM_ASSERT_THROWS_NOTHING
#define _TSM_ASSERT_THROWS_NOTHING(f, l, m, e)
Definition TestSuite.h:465
CxxTest::GlobalFixture::nextGlobalFixture
GlobalFixture * nextGlobalFixture()
Definition GlobalFixture.cpp:18
CxxTest::GlobalFixture::firstGlobalFixture
static GlobalFixture * firstGlobalFixture()
Definition GlobalFixture.cpp:16
CxxTest::RealTestDescription::suite
TestSuite * suite() const
Definition RealDescriptions.cpp:92
CxxTest::RealTestDescription::setUp
bool setUp()
Definition RealDescriptions.cpp:36
CxxTest::doFailTest
void doFailTest(const char *file, unsigned line, const char *message)
Definition TestSuite.cpp:66

## suite()

TestSuite * CxxTest::RealTestDescription::suite | ( |  | ) | const

Definition at line 92 of file RealDescriptions.cpp.

{ return _suite->suite(); }

## suiteName()

const char * CxxTest::RealTestDescription::suiteName | ( |  | ) | const

virtual

Implements CxxTest::TestDescription.

Definition at line 87 of file RealDescriptions.cpp.

{ return _suite->suiteName(); }

## tearDown()

bool CxxTest::RealTestDescription::tearDown | ( |  | ) |

virtual

Implements CxxTest::Link.

Definition at line 60 of file RealDescriptions.cpp.

{
if ( !suite() )
return false;
_TS_TRY {
_TSM_ASSERT_THROWS_NOTHING( file(), line(), "Exception thrown from tearDown()", suite()->tearDown() );
}
_TS_CATCH_ABORT( { return false; } );
for ( GlobalFixture *gf = GlobalFixture::lastGlobalFixture(); gf != 0; gf = gf->prevGlobalFixture() ) {
bool ok;
_TS_TRY { ok = gf->tearDown(); }
_TS_LAST_CATCH( { ok = false; } );
if ( !ok ) {
doFailTest( file(), line(), "Error in GlobalFixture::tearDown()" );
return false;
}
}
return true;
}
CxxTest::GlobalFixture::prevGlobalFixture
GlobalFixture * prevGlobalFixture()
Definition GlobalFixture.cpp:19
CxxTest::GlobalFixture::lastGlobalFixture
static GlobalFixture * lastGlobalFixture()
Definition GlobalFixture.cpp:17
CxxTest::RealTestDescription::tearDown
bool tearDown()
Definition RealDescriptions.cpp:60

## testName()

const char * CxxTest::RealTestDescription::testName | ( |  | ) | const

virtual

Implements CxxTest::TestDescription.

Definition at line 86 of file RealDescriptions.cpp.

{ return _testName; }

## Field Documentation

## _line

unsigned CxxTest::RealTestDescription::_line

private

Definition at line 42 of file RealDescriptions.h.

## _suite

SuiteDescription* CxxTest::RealTestDescription::_suite

private

Definition at line 41 of file RealDescriptions.h.

## _testName

const char* CxxTest::RealTestDescription::_testName

private

Definition at line 43 of file RealDescriptions.h.

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

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