Loading...
Searching...
No Matches
CxxTest Namespace Reference

## Data Structures

class | TestDescription
class | SuiteDescription
class | WorldDescription
class | DummyTestDescription
class | DummySuiteDescription
class | DummyWorldDescription
class | OutputStream
class | ErrorFormatter
class | ErrorPrinter
class | GlobalFixture
class | GuiListener
class | GuiTuiRunner
struct | List
class | Link
class | ParenPrinter
class | QtGui
class | RealTestDescription
class | RealSuiteDescription
class | StaticSuiteDescription
class | CommonDynamicSuiteDescription
class | DynamicSuiteDescription
class | RealWorldDescription
class | StdioFilePrinter
class | StdioPrinter
class | StdTraitsBase
class | ValueTraits< const CXXTEST_STD(string)>
class | ValueTraits< const CXXTEST_STD(basic_string< wchar_t >)>
class | TeeListener
class | TestListener
class | TestRunner
class | TestSuite
class | AbortTest
class | TestTracker
class | ValueTraits
class | ValueTraits< const bool >
class | ValueTraits< const signed long int >
class | ValueTraits< const unsigned long int >
class | ValueTraits< const char >
class | ValueTraits< const double >
class | Win32Gui
class | X11Gui
class | YesNoRunner

## Functions

void | activateAllTests ()
bool | leaveOnly (const char *suiteName, const char *testName)
| CXXTEST_COPY_CONST_TRAITS (CXXTEST_STD(string))
| CXXTEST_COPY_CONST_TRAITS (CXXTEST_STD(basic_string< wchar_t >))
template<class Stream, class Iterator>
void | dumpRange (Stream &s, Iterator first, Iterator last)
void | initialize ()
bool | abortTestOnFail ()
void | setAbortTestOnFail (bool value)
void | doAbortTest ()
unsigned | maxDumpSize ()
void | setMaxDumpSize (unsigned value)
void | doTrace (const char *file, unsigned line, const char *message)
void | doWarn (const char *file, unsigned line, const char *message)
void | doFailTest (const char *file, unsigned line, const char *message)
void | doFailAssert (const char *file, unsigned line, const char *expression, const char *message)
bool | sameData (const void *x, const void *y, unsigned size)
void | doAssertSameData (const char *file, unsigned line, const char *xExpr, const void *x, const char *yExpr, const void *y, const char *sizeExpr, unsigned size, const char *message)
void | doFailAssertThrows (const char *file, unsigned line, const char *expr, const char *type, bool otherThrown, const char *message)
void | doFailAssertThrowsNot (const char *file, unsigned line, const char *expression, const char *message)
template<class X, class Y>
bool | equals (X x, Y y)
template<class X, class Y>
void | doAssertEquals (const char *file, unsigned line, const char *xExpr, X x, const char *yExpr, Y y, const char *message)
template<class X, class Y>
bool | differs (X x, Y y)
template<class X, class Y>
void | doAssertDiffers (const char *file, unsigned line, const char *xExpr, X x, const char *yExpr, Y y, const char *message)
template<class X, class Y>
bool | lessThan (X x, Y y)
template<class X, class Y>
void | doAssertLessThan (const char *file, unsigned line, const char *xExpr, X x, const char *yExpr, Y y, const char *message)
template<class X, class Y>
bool | lessThanEquals (X x, Y y)
template<class X, class Y>
void | doAssertLessThanEquals (const char *file, unsigned line, const char *xExpr, X x, const char *yExpr, Y y, const char *message)
template<class X, class P>
void | doAssertPredicate (const char *file, unsigned line, const char *pExpr, const P &p, const char *xExpr, X x, const char *message)
template<class X, class Y, class R>
void | doAssertRelation (const char *file, unsigned line, const char *rExpr, const R &r, const char *xExpr, X x, const char *yExpr, Y y, const char *message)
template<class X, class Y, class D>
bool | delta (X x, Y y, D d)
template<class X, class Y, class D>
void | doAssertDelta (const char *file, unsigned line, const char *xExpr, X x, const char *yExpr, Y y, const char *dExpr, D d, const char *message)
| CXXTEST_INTEGRAL (char) CXXTEST_INTEGRAL(short) CXXTEST_INTEGRAL(int) CXXTEST_INTEGRAL(long) CXXTEST_SMALL_BIG(char
short | CXXTEST_SMALL_BIG (char, int) CXXTEST_SMALL_BIG(short
short int | CXXTEST_SMALL_BIG (char, long) CXXTEST_SMALL_BIG(short
TestTracker & | tracker ()
char | digitToChar (unsigned digit)
const char * | byteToHex (unsigned char byte)
char * | copyString (char *dst, const char *src)
bool | stringsEqual (const char *s1, const char *s2)
char * | charToString (unsigned long c, char *s)
char * | charToString (char c, char *s)
char * | bytesToString (const unsigned char *bytes, unsigned numBytes, unsigned maxBytes, char *s)
template<class T>
ValueTraits< T > | traits (T t)
template<class N>
bool | negative (N n)
template<class N>
N | abs (N n)
| CXXTEST_NON_NEGATIVE (bool) CXXTEST_NON_NEGATIVE(unsigned char) CXXTEST_NON_NEGATIVE(unsigned short int) CXXTEST_NON_NEGATIVE(unsigned int) CXXTEST_NON_NEGATIVE(unsigned long int) template< class N > char *numberToString(N n
| CXXTEST_COPY_TRAITS (const char *, const char *const &)
| CXXTEST_COPY_TRAITS (char *, const char *const &)
| CXXTEST_COPY_CONST_TRAITS (bool)
| CXXTEST_COPY_CONST_TRAITS (signed long int)
| CXXTEST_COPY_CONST_TRAITS (unsigned long int)
| CXXTEST_COPY_TRAITS (const signed int, const signed long int)
| CXXTEST_COPY_TRAITS (const unsigned int, const unsigned long int)
| CXXTEST_COPY_TRAITS (const signed short int, const signed long int)
| CXXTEST_COPY_TRAITS (const unsigned short int, const unsigned long int)
| CXXTEST_COPY_TRAITS (const unsigned char, const unsigned long int)
| CXXTEST_COPY_CONST_TRAITS (signed int)
| CXXTEST_COPY_CONST_TRAITS (unsigned int)
| CXXTEST_COPY_CONST_TRAITS (signed short int)
| CXXTEST_COPY_CONST_TRAITS (unsigned short int)
| CXXTEST_COPY_CONST_TRAITS (unsigned char)
| CXXTEST_COPY_CONST_TRAITS (char)
| CXXTEST_COPY_TRAITS (const signed char, const char)
| CXXTEST_COPY_CONST_TRAITS (signed char)
| CXXTEST_COPY_CONST_TRAITS (double)
| CXXTEST_COPY_TRAITS (const float, const double)
| CXXTEST_COPY_CONST_TRAITS (float)

## Variables

static bool | currentAbortTestOnFail = false
static unsigned | currentMaxDumpSize = CXXTEST_MAX_DUMP_SIZE
char * | s
char N | base = 10
char N unsigned | skipDigits = 0
char N unsigned unsigned | maxDigits

## Data Structure Documentation

## CxxTest::AbortTest

class CxxTest::AbortTest

Definition at line 29 of file TestSuite.h.

## Function Documentation

## abortTestOnFail()

bool CxxTest::abortTestOnFail | ( |  | ) |

Definition at line 20 of file TestSuite.cpp.

{
return currentAbortTestOnFail;
}
CxxTest::currentAbortTestOnFail
static bool currentAbortTestOnFail
Definition TestSuite.cpp:18

## abs()

template<class N>

N CxxTest::abs | ( | N | n | ) |

inline

Definition at line 120 of file ValueTraits.h.

{ return negative(n) ? -n : n; }
CxxTest::negative
bool negative(N n)
Definition ValueTraits.h:119

## activateAllTests()

void CxxTest::activateAllTests | ( |  | ) |

Definition at line 299 of file RealDescriptions.cpp.

{
RealWorldDescription().activateAllTests();
}
CxxTest::RealWorldDescription
Definition RealDescriptions.h:202
CxxTest::RealWorldDescription::activateAllTests
void activateAllTests()
Definition RealDescriptions.cpp:241

## bytesToString()

char * CxxTest::bytesToString | ( | const unsigned char * | bytes,
|  | unsigned | numBytes,
|  | unsigned | maxBytes,
|  | char * | s )

Definition at line 82 of file ValueTraits.cpp.

{
bool truncate = (numBytes > maxBytes);
if ( truncate )
numBytes = maxBytes;
s = copyString( s, "{ " );
for ( unsigned i = 0; i < numBytes; ++ i, ++ bytes )
s = copyString( copyString( s, byteToHex( *bytes ) ), " " );
if ( truncate )
s = copyString( s, "..." );
return copyString( s, " }" );
}
i
int i
Definition cfEzgcd.cc:132
CxxTest::byteToHex
const char * byteToHex(unsigned char byte)
Definition ValueTraits.cpp:21
CxxTest::copyString
char * copyString(char *dst, const char *src)
Definition ValueTraits.cpp:30
CxxTest::s
char * s
Definition ValueTraits.h:143

## byteToHex()

const char * CxxTest::byteToHex | ( | unsigned char | byte | ) |

Definition at line 21 of file ValueTraits.cpp.

{
STATIC_VAR char asHex[3];
asHex[0] = digitToChar( byte >> 4 );
asHex[1] = digitToChar( byte & 0x0F );
asHex[2] = '\0';
return asHex;
}
STATIC_VAR
#define STATIC_VAR
Definition globaldefs.h:7
CxxTest::digitToChar
char digitToChar(unsigned digit)
Definition ValueTraits.cpp:12

## charToString() [1/2]

char * CxxTest::charToString | ( | char | c,
|  | char * | s )

Definition at line 77 of file ValueTraits.cpp.

{
return charToString( (unsigned long)(unsigned char)c, s );
}
CxxTest::charToString
char * charToString(unsigned long c, char *s)
Definition ValueTraits.cpp:48

## charToString() [2/2]

char * CxxTest::charToString | ( | unsigned long | c,
|  | char * | s )

Definition at line 48 of file ValueTraits.cpp.

{
switch( c ) {
case '\\': return copyString( s, "\\\\" );
case '\"': return copyString( s, "\\\"" );
case '\'': return copyString( s, "\\\'" );
case '\0': return copyString( s, "\\0" );
case '\a': return copyString( s, "\\a" );
case '\b': return copyString( s, "\\b" );
case '\n': return copyString( s, "\\n" );
case '\r': return copyString( s, "\\r" );
case '\t': return copyString( s, "\\t" );
}
if ( c >= 32 && c <= 127 ) {
s[0] = (char)c;
s[1] = '\0';
return s + 1;
}
else {
s[0] = '\\';
s[1] = 'x';
if ( c < 0x10 ) {
s[2] = '0';
++ s;
}
return numberToString( c, s + 2, 16UL );
}
}
s
const CanonicalForm int s
Definition facAbsFact.cc:51

## copyString()

char * CxxTest::copyString | ( | char * | dst,
|  | const char * | src )

Definition at line 30 of file ValueTraits.cpp.

{
while ( (*dst = *src) != '\0' ) {
++ dst;
++ src;
}
return dst;
}

## CXXTEST_COPY_CONST_TRAITS() [1/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | bool |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [2/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | char |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [3/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | CXXTEST_STD(basic_string< wchar_t >) |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [4/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | CXXTEST_STD(string) |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [5/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | double |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [6/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | float |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [7/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | signed char |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [8/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | signed int |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [9/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | signed long int |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [10/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | signed short int |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [11/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | unsigned char |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [12/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | unsigned int |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [13/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | unsigned long int |  | ) |

## CXXTEST_COPY_CONST_TRAITS() [14/14]

CxxTest::CXXTEST_COPY_CONST_TRAITS | ( | unsigned short int |  | ) |

## CXXTEST_COPY_TRAITS() [1/9]

CxxTest::CXXTEST_COPY_TRAITS | ( | char * | ,
|  | const char *const & | )

## CXXTEST_COPY_TRAITS() [2/9]

CxxTest::CXXTEST_COPY_TRAITS | ( | const char * | ,
|  | const char *const & | )

## CXXTEST_COPY_TRAITS() [3/9]

CxxTest::CXXTEST_COPY_TRAITS | ( | const float | ,
|  | const double | )

## CXXTEST_COPY_TRAITS() [4/9]

CxxTest::CXXTEST_COPY_TRAITS | ( | const signed char | ,
|  | const char | )

## CXXTEST_COPY_TRAITS() [5/9]

CxxTest::CXXTEST_COPY_TRAITS | ( | const signed int | ,
|  | const signed long int | )

## CXXTEST_COPY_TRAITS() [6/9]

CxxTest::CXXTEST_COPY_TRAITS | ( | const signed short int | ,
|  | const signed long int | )

## CXXTEST_COPY_TRAITS() [7/9]

CxxTest::CXXTEST_COPY_TRAITS | ( | const unsigned char | ,
|  | const unsigned long int | )

## CXXTEST_COPY_TRAITS() [8/9]

CxxTest::CXXTEST_COPY_TRAITS | ( | const unsigned int | ,
|  | const unsigned long int | )

## CXXTEST_COPY_TRAITS() [9/9]

CxxTest::CXXTEST_COPY_TRAITS | ( | const unsigned short int | ,
|  | const unsigned long int | )

## CXXTEST_INTEGRAL()

CxxTest::CXXTEST_INTEGRAL | ( | char |  | ) |

## CXXTEST_NON_NEGATIVE()

CxxTest::CXXTEST_NON_NEGATIVE | ( | bool |  | ) |

## CXXTEST_SMALL_BIG() [1/2]

short CxxTest::CXXTEST_SMALL_BIG | ( | char | ,
|  | int | )

## CXXTEST_SMALL_BIG() [2/2]

short int CxxTest::CXXTEST_SMALL_BIG | ( | char | ,
|  | long | )

## delta()

template<class X, class Y, class D>

bool CxxTest::delta | ( | X | x,
|  | Y | y,
|  | D | d )

Definition at line 160 of file TestSuite.h.

{
return ((y >= x - d) && (y <= x + d));
}
x
Variable x
Definition cfModGcd.cc:4090
y
const CanonicalForm int const CFList const Variable & y
Definition facAbsFact.cc:53

## differs()

template<class X, class Y>

bool CxxTest::differs | ( | X | x,
|  | Y | y )

Definition at line 71 of file TestSuite.h.

{
return !(x == y);
}

## digitToChar()

char CxxTest::digitToChar | ( | unsigned | digit | ) |

Definition at line 12 of file ValueTraits.cpp.

{
if ( digit < 10 )
return (char)('0' + digit);
if ( digit <= 10 + 'Z' - 'A' )
return (char)('A' + digit - 10);
return '?';
}

## doAbortTest()

void CxxTest::doAbortTest | ( |  | ) |

Definition at line 30 of file TestSuite.cpp.

{
# if defined(_CXXTEST_HAVE_EH)
if ( currentAbortTestOnFail )
throw AbortTest();
# endif // _CXXTEST_HAVE_EH
}
CxxTest::AbortTest
Definition TestSuite.h:29

## doAssertDelta()

template<class X, class Y, class D>

void CxxTest::doAssertDelta | ( | const char * | file,
|  | unsigned | line,
|  | const char * | xExpr,
|  | X | x,
|  | const char * | yExpr,
|  | Y | y,
|  | const char * | dExpr,
|  | D | d,
|  | const char * | message )

Definition at line 166 of file TestSuite.h.

{
if ( !delta( x, y, d ) ) {
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssertDelta( file, line, xExpr, yExpr, dExpr,
TS_AS_STRING(x), TS_AS_STRING(y), TS_AS_STRING(d) );
TS_ABORT();
}
}
TS_ABORT
#define TS_ABORT()
Definition TestSuite.h:31
TS_AS_STRING
#define TS_AS_STRING(x)
Definition ValueTraits.h:26
CxxTest::TestTracker::failedTest
void failedTest(const char *file, unsigned line, const char *expression)
Definition TestTracker.cpp:126
CxxTest::TestTracker::failedAssertDelta
void failedAssertDelta(const char *file, unsigned line, const char *xStr, const char *yStr, const char *dStr, const char *x, const char *y, const char *d)
Definition TestTracker.cpp:155
message
void message(int i, int *olddeg, int *reduc, kStrategy strat, int red_result)
Definition kutil.cc:7463
CxxTest::delta
bool delta(X x, Y y, D d)
Definition TestSuite.h:160
CxxTest::tracker
TestTracker & tracker()
Definition TestTracker.h:111

## doAssertDiffers()

template<class X, class Y>

void CxxTest::doAssertDiffers | ( | const char * | file,
|  | unsigned | line,
|  | const char * | xExpr,
|  | X | x,
|  | const char * | yExpr,
|  | Y | y,
|  | const char * | message )

Definition at line 77 of file TestSuite.h.

{
if ( !differs( x, y ) ) {
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssertDiffers( file, line, xExpr, yExpr, TS_AS_STRING(x) );
TS_ABORT();
}
}
CxxTest::TestTracker::failedAssertDiffers
void failedAssertDiffers(const char *file, unsigned line, const char *xStr, const char *yStr, const char *value)
Definition TestTracker.cpp:163
CxxTest::differs
bool differs(X x, Y y)
Definition TestSuite.h:71

## doAssertEquals()

template<class X, class Y>

void CxxTest::doAssertEquals | ( | const char * | file,
|  | unsigned | line,
|  | const char * | xExpr,
|  | X | x,
|  | const char * | yExpr,
|  | Y | y,
|  | const char * | message )

Definition at line 51 of file TestSuite.h.

{
if ( !equals( x, y ) ) {
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssertEquals( file, line, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) );
TS_ABORT();
}
}
CxxTest::TestTracker::failedAssertEquals
void failedAssertEquals(const char *file, unsigned line, const char *xStr, const char *yStr, const char *x, const char *y)
Definition TestTracker.cpp:138
CxxTest::equals
bool equals(X x, Y y)
Definition TestSuite.h:45

## doAssertLessThan()

template<class X, class Y>

void CxxTest::doAssertLessThan | ( | const char * | file,
|  | unsigned | line,
|  | const char * | xExpr,
|  | X | x,
|  | const char * | yExpr,
|  | Y | y,
|  | const char * | message )

Definition at line 97 of file TestSuite.h.

{
if ( !lessThan(x, y) ) {
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssertLessThan( file, line, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) );
TS_ABORT();
}
}
CxxTest::TestTracker::failedAssertLessThan
void failedAssertLessThan(const char *file, unsigned line, const char *xStr, const char *yStr, const char *x, const char *y)
Definition TestTracker.cpp:171
CxxTest::lessThan
bool lessThan(X x, Y y)
Definition TestSuite.h:91

## doAssertLessThanEquals()

template<class X, class Y>

void CxxTest::doAssertLessThanEquals | ( | const char * | file,
|  | unsigned | line,
|  | const char * | xExpr,
|  | X | x,
|  | const char * | yExpr,
|  | Y | y,
|  | const char * | message )

Definition at line 117 of file TestSuite.h.

{
if ( !lessThanEquals( x, y ) ) {
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssertLessThanEquals( file, line, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) );
TS_ABORT();
}
}
CxxTest::TestTracker::failedAssertLessThanEquals
void failedAssertLessThanEquals(const char *file, unsigned line, const char *xStr, const char *yStr, const char *x, const char *y)
Definition TestTracker.cpp:179
CxxTest::lessThanEquals
bool lessThanEquals(X x, Y y)
Definition TestSuite.h:111

## doAssertPredicate()

template<class X, class P>

void CxxTest::doAssertPredicate | ( | const char * | file,
|  | unsigned | line,
|  | const char * | pExpr,
|  | const P & | p,
|  | const char * | xExpr,
|  | X | x,
|  | const char * | message )

Definition at line 131 of file TestSuite.h.

{
if ( !p( x ) ) {
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssertPredicate( file, line, pExpr, xExpr, TS_AS_STRING(x) );
TS_ABORT();
}
}
p
int p
Definition cfModGcd.cc:4086
CxxTest::TestTracker::failedAssertPredicate
void failedAssertPredicate(const char *file, unsigned line, const char *predicate, const char *xStr, const char *x)
Definition TestTracker.cpp:187

## doAssertRelation()

template<class X, class Y, class R>

void CxxTest::doAssertRelation | ( | const char * | file,
|  | unsigned | line,
|  | const char * | rExpr,
|  | const R & | r,
|  | const char * | xExpr,
|  | X | x,
|  | const char * | yExpr,
|  | Y | y,
|  | const char * | message )

Definition at line 145 of file TestSuite.h.

{
if ( !r( x, y ) ) {
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssertRelation( file, line, rExpr, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) );
TS_ABORT();
}
}
CxxTest::TestTracker::failedAssertRelation
void failedAssertRelation(const char *file, unsigned line, const char *relation, const char *xStr, const char *yStr, const char *x, const char *y)
Definition TestTracker.cpp:194

## doAssertSameData()

void CxxTest::doAssertSameData | ( | const char * | file,
|  | unsigned | line,
|  | const char * | xExpr,
|  | const void * | x,
|  | const char * | yExpr,
|  | const void * | y,
|  | const char * | sizeExpr,
|  | unsigned | size,
|  | const char * | message )

Definition at line 101 of file TestSuite.cpp.

{
if ( !sameData( x, y, size ) ) {
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssertSameData( file, line, xExpr, yExpr, sizeExpr, x, y, size );
TS_ABORT();
}
}
size
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition cf_ops.cc:600
CxxTest::TestTracker::failedAssertSameData
void failedAssertSameData(const char *file, unsigned line, const char *xStr, const char *yStr, const char *sizeStr, const void *x, const void *y, unsigned size)
Definition TestTracker.cpp:146
CxxTest::sameData
bool sameData(const void *x, const void *y, unsigned size)
Definition TestSuite.cpp:81

## doFailAssert()

void CxxTest::doFailAssert | ( | const char * | file,
|  | unsigned | line,
|  | const char * | expression,
|  | const char * | message )

Definition at line 72 of file TestSuite.cpp.

{
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssert( file, line, expression );
TS_ABORT();
}
CxxTest::TestTracker::failedAssert
void failedAssert(const char *file, unsigned line, const char *expression)
Definition TestTracker.cpp:132

## doFailAssertThrows()

void CxxTest::doFailAssertThrows | ( | const char * | file,
|  | unsigned | line,
|  | const char * | expr,
|  | const char * | type,
|  | bool | otherThrown,
|  | const char * | message )

Definition at line 115 of file TestSuite.cpp.

{
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssertThrows( file, line, expr, type, otherThrown );
TS_ABORT();
}
CxxTest::TestTracker::failedAssertThrows
void failedAssertThrows(const char *file, unsigned line, const char *expression, const char *type, bool otherThrown)
Definition TestTracker.cpp:202

## doFailAssertThrowsNot()

void CxxTest::doFailAssertThrowsNot | ( | const char * | file,
|  | unsigned | line,
|  | const char * | expression,
|  | const char * | message )

Definition at line 127 of file TestSuite.cpp.

{
if ( message )
tracker().failedTest( file, line, message );
tracker().failedAssertThrowsNot( file, line, expression );
TS_ABORT();
}
CxxTest::TestTracker::failedAssertThrowsNot
void failedAssertThrowsNot(const char *file, unsigned line, const char *expression)
Definition TestTracker.cpp:210

## doFailTest()

void CxxTest::doFailTest | ( | const char * | file,
|  | unsigned | line,
|  | const char * | message )

Definition at line 66 of file TestSuite.cpp.

{
tracker().failedTest( file, line, message );
TS_ABORT();
}

## doTrace()

void CxxTest::doTrace | ( | const char * | file,
|  | unsigned | line,
|  | const char * | message )

Definition at line 56 of file TestSuite.cpp.

{
tracker().trace( file, line, message );
}
CxxTest::TestTracker::trace
void trace(const char *file, unsigned line, const char *expression)
Definition TestTracker.cpp:115

## doWarn()

void CxxTest::doWarn | ( | const char * | file,
|  | unsigned | line,
|  | const char * | message )

Definition at line 61 of file TestSuite.cpp.

{
tracker().warning( file, line, message );
}
CxxTest::TestTracker::warning
void warning(const char *file, unsigned line, const char *expression)
Definition TestTracker.cpp:120

## dumpRange()

template<class Stream, class Iterator>

void CxxTest::dumpRange | ( | Stream & | s,
|  | Iterator | first,
|  | Iterator | last )

Definition at line 92 of file StdValueTraits.h.

{
s << "{ ";
while ( first != last ) {
s << TS_AS_STRING(*first);
++ first;
s << ((first == last) ? " }" : ", ");
}
}
last
STATIC_VAR poly last
Definition hdegree.cc:1138

## equals()

template<class X, class Y>

bool CxxTest::equals | ( | X | x,
|  | Y | y )

Definition at line 45 of file TestSuite.h.

{
return (x == y);
}

## initialize()

void CxxTest::initialize | ( |  | ) |

## leaveOnly()

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

Definition at line 304 of file RealDescriptions.cpp.

{
return RealWorldDescription().leaveOnly( suiteName, testName );
}
CxxTest::RealWorldDescription::leaveOnly
bool leaveOnly(const char *suiteName, const char *testName=0)
Definition RealDescriptions.cpp:248

## lessThan()

template<class X, class Y>

bool CxxTest::lessThan | ( | X | x,
|  | Y | y )

Definition at line 91 of file TestSuite.h.

{
return (x < y);
}

## lessThanEquals()

template<class X, class Y>

bool CxxTest::lessThanEquals | ( | X | x,
|  | Y | y )

Definition at line 111 of file TestSuite.h.

{
return (x <= y);
}

## maxDumpSize()

unsigned CxxTest::maxDumpSize | ( |  | ) |

Definition at line 43 of file TestSuite.cpp.

{
return currentMaxDumpSize;
}
CxxTest::currentMaxDumpSize
static unsigned currentMaxDumpSize
Definition TestSuite.cpp:41

## negative()

template<class N>

bool CxxTest::negative | ( | N | n | ) |

inline

Definition at line 119 of file ValueTraits.h.

{ return n < 0; }

## sameData()

bool CxxTest::sameData | ( | const void * | x,
|  | const void * | y,
|  | unsigned | size )

Definition at line 81 of file TestSuite.cpp.

{
if ( size == 0 )
return true;
if ( x == y )
return true;
if ( !x || !y )
return false;
const char *cx = (const char *)x;
const char *cy = (const char *)y;
while ( size -- )
if ( *cx++ != *cy++ )
return false;
return true;
}

## setAbortTestOnFail()

void CxxTest::setAbortTestOnFail | ( | bool | value | ) |

Definition at line 25 of file TestSuite.cpp.

{
currentAbortTestOnFail = value;
}

## setMaxDumpSize()

void CxxTest::setMaxDumpSize | ( | unsigned | value | ) |

Definition at line 48 of file TestSuite.cpp.

{
currentMaxDumpSize = value;
}

## stringsEqual()

bool CxxTest::stringsEqual | ( | const char * | s1,
|  | const char * | s2 )

Definition at line 39 of file ValueTraits.cpp.

{
char c;
while ( (c = *s1++) == *s2++ )
if ( c == '\0' )
return true;
return false;
}

## tracker()

TestTracker & CxxTest::tracker | ( |  | ) |

inline

Definition at line 111 of file TestTracker.h.

{ return TestTracker::tracker(); }
CxxTest::TestTracker::tracker
static TestTracker & tracker()
Definition TestTracker.cpp:22

## traits()

template<class T>

ValueTraits< T > CxxTest::traits | ( | T | t | ) |

inline

Definition at line 89 of file ValueTraits.h.

{
return ValueTraits<T>( t );
}
CxxTest::ValueTraits
Definition ValueTraits.h:75

## Variable Documentation

## base

char N CxxTest::base = 10

Definition at line 144 of file ValueTraits.h.

## currentAbortTestOnFail

bool CxxTest::currentAbortTestOnFail = false

static

Definition at line 18 of file TestSuite.cpp.

## currentMaxDumpSize

unsigned CxxTest::currentMaxDumpSize = CXXTEST_MAX_DUMP_SIZE

static

Definition at line 41 of file TestSuite.cpp.

## maxDigits

char N unsigned unsigned CxxTest::maxDigits

Definition at line 146 of file ValueTraits.h.

{
if ( negative(n) ) {
*s++ = '-';
n = abs(n);
}
N digit = 1;
while ( digit <= (n / base) )
digit *= base;
N digitValue;
for ( ; digit >= 1 && skipDigits; n -= digit * digitValue, digit /= base, -- skipDigits )
digitValue = (unsigned)(n / digit);
for ( ; digit >= 1 && maxDigits; n -= digit * digitValue, digit /= base, -- maxDigits )
*s++ = digitToChar( (unsigned)(digitValue = (unsigned)(n / digit)) );
*s = '\0';
return s;
}
//
// All the specific ValueTraits follow.
// You can #define CXXTEST_USER_VALUE_TRAITS if you don't want them
//
#ifndef CXXTEST_USER_VALUE_TRAITS
//
// ValueTraits: const char * const &
// This is used for printing strings, as in TS_FAIL( "Message" )
//
CXXTEST_TEMPLATE_INSTANTIATION
class ValueTraits<const char * const &>
{
ValueTraits &operator=( const ValueTraits & );
const char *_asString;
public:
ValueTraits( const char * const &value ) : _asString( value ) {}
ValueTraits( const ValueTraits &other ) : _asString( other._asString ) {}
const char *asString( void ) const { return _asString; }
};
CXXTEST_TEMPLATE_INSTANTIATION
#define CXXTEST_TEMPLATE_INSTANTIATION
Definition ValueTraits.h:18
N
const CanonicalForm CFMap CFMap & N
Definition cfEzgcd.cc:56
const
#define const
Definition fegetopt.c:39
CxxTest::skipDigits
char N unsigned skipDigits
Definition ValueTraits.h:145
CxxTest::abs
N abs(N n)
Definition ValueTraits.h:120
CxxTest::maxDigits
char N unsigned unsigned maxDigits
Definition ValueTraits.h:146
CxxTest::base
char N base
Definition ValueTraits.h:144

## s

char* CxxTest::s

Definition at line 143 of file ValueTraits.h.

## skipDigits

char N unsigned CxxTest::skipDigits = 0

Definition at line 145 of file ValueTraits.h.