My Project
Loading...
Searching...
No Matches
Data Structures | Functions | Variables
CxxTest Namespace Reference

Data Structures

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

21 {
23 }
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.

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

◆ activateAllTests()

void CxxTest::activateAllTests ( )

◆ bytesToString()

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

Definition at line 82 of file ValueTraits.cpp.

83 {
84 bool truncate = (numBytes > maxBytes);
85 if ( truncate )
86 numBytes = maxBytes;
87
88 s = copyString( s, "{ " );
89 for ( unsigned i = 0; i < numBytes; ++ i, ++ bytes )
90 s = copyString( copyString( s, byteToHex( *bytes ) ), " " );
91 if ( truncate )
92 s = copyString( s, "..." );
93 return copyString( s, " }" );
94 }
int i
Definition: cfEzgcd.cc:132
const CanonicalForm int s
Definition: facAbsFact.cc:51
const char * byteToHex(unsigned char byte)
Definition: ValueTraits.cpp:21
char * copyString(char *dst, const char *src)
Definition: ValueTraits.cpp:30

◆ byteToHex()

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

Definition at line 21 of file ValueTraits.cpp.

22 {
23 STATIC_VAR char asHex[3];
24 asHex[0] = digitToChar( byte >> 4 );
25 asHex[1] = digitToChar( byte & 0x0F );
26 asHex[2] = '\0';
27 return asHex;
28 }
#define STATIC_VAR
Definition: globaldefs.h:7
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.

78 {
79 return charToString( (unsigned long)(unsigned char)c, s );
80 }
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.

49 {
50 switch( c ) {
51 case '\\': return copyString( s, "\\\\" );
52 case '\"': return copyString( s, "\\\"" );
53 case '\'': return copyString( s, "\\\'" );
54 case '\0': return copyString( s, "\\0" );
55 case '\a': return copyString( s, "\\a" );
56 case '\b': return copyString( s, "\\b" );
57 case '\n': return copyString( s, "\\n" );
58 case '\r': return copyString( s, "\\r" );
59 case '\t': return copyString( s, "\\t" );
60 }
61 if ( c >= 32 && c <= 127 ) {
62 s[0] = (char)c;
63 s[1] = '\0';
64 return s + 1;
65 }
66 else {
67 s[0] = '\\';
68 s[1] = 'x';
69 if ( c < 0x10 ) {
70 s[2] = '0';
71 ++ s;
72 }
73 return numberToString( c, s + 2, 16UL );
74 }
75 }

◆ copyString()

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

Definition at line 30 of file ValueTraits.cpp.

31 {
32 while ( (*dst = *src) != '\0' ) {
33 ++ dst;
34 ++ src;
35 }
36 return dst;
37 }

◆ 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,
y,
D  d 
)

Definition at line 160 of file TestSuite.h.

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

◆ differs()

template<class X , class Y >
bool CxxTest::differs ( x,
y 
)

Definition at line 71 of file TestSuite.h.

72 {
73 return !(x == y);
74 }

◆ digitToChar()

char CxxTest::digitToChar ( unsigned  digit)

Definition at line 12 of file ValueTraits.cpp.

13 {
14 if ( digit < 10 )
15 return (char)('0' + digit);
16 if ( digit <= 10 + 'Z' - 'A' )
17 return (char)('A' + digit - 10);
18 return '?';
19 }

◆ doAbortTest()

void CxxTest::doAbortTest ( )

Definition at line 30 of file TestSuite.cpp.

31 {
32# if defined(_CXXTEST_HAVE_EH)
33 if ( currentAbortTestOnFail )
34 throw AbortTest();
35# endif // _CXXTEST_HAVE_EH
36 }

◆ doAssertDelta()

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

Definition at line 166 of file TestSuite.h.

171 {
172 if ( !delta( x, y, d ) ) {
173 if ( message )
174 tracker().failedTest( file, line, message );
175
176 tracker().failedAssertDelta( file, line, xExpr, yExpr, dExpr,
178 TS_ABORT();
179 }
180 }
#define TS_ABORT()
Definition: TestSuite.h:31
#define TS_AS_STRING(x)
Definition: ValueTraits.h:26
void failedTest(const char *file, unsigned line, const char *expression)
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)
void message(int i, int *reduc, int *olddeg, kStrategy strat, int red_result)
Definition: kutil.cc:7512
bool delta(X x, Y y, D d)
Definition: TestSuite.h:160
TestTracker & tracker()
Definition: TestTracker.h:111

◆ doAssertDiffers()

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

Definition at line 77 of file TestSuite.h.

81 {
82 if ( !differs( x, y ) ) {
83 if ( message )
84 tracker().failedTest( file, line, message );
85 tracker().failedAssertDiffers( file, line, xExpr, yExpr, TS_AS_STRING(x) );
86 TS_ABORT();
87 }
88 }
void failedAssertDiffers(const char *file, unsigned line, const char *xStr, const char *yStr, const char *value)
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,
const char *  yExpr,
y,
const char *  message 
)

Definition at line 51 of file TestSuite.h.

55 {
56 if ( !equals( x, y ) ) {
57 if ( message )
58 tracker().failedTest( file, line, message );
59 tracker().failedAssertEquals( file, line, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) );
60 TS_ABORT();
61 }
62 }
void failedAssertEquals(const char *file, unsigned line, const char *xStr, const char *yStr, const char *x, const char *y)
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,
const char *  yExpr,
y,
const char *  message 
)

Definition at line 97 of file TestSuite.h.

101 {
102 if ( !lessThan(x, y) ) {
103 if ( message )
104 tracker().failedTest( file, line, message );
105 tracker().failedAssertLessThan( file, line, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) );
106 TS_ABORT();
107 }
108 }
void failedAssertLessThan(const char *file, unsigned line, const char *xStr, const char *yStr, const char *x, const char *y)
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,
const char *  yExpr,
y,
const char *  message 
)

Definition at line 117 of file TestSuite.h.

121 {
122 if ( !lessThanEquals( x, y ) ) {
123 if ( message )
124 tracker().failedTest( file, line, message );
125 tracker().failedAssertLessThanEquals( file, line, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) );
126 TS_ABORT();
127 }
128 }
void failedAssertLessThanEquals(const char *file, unsigned line, const char *xStr, const char *yStr, const char *x, const char *y)
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,
const char *  message 
)

Definition at line 131 of file TestSuite.h.

135 {
136 if ( !p( x ) ) {
137 if ( message )
138 tracker().failedTest( file, line, message );
139 tracker().failedAssertPredicate( file, line, pExpr, xExpr, TS_AS_STRING(x) );
140 TS_ABORT();
141 }
142 }
int p
Definition: cfModGcd.cc:4078
void failedAssertPredicate(const char *file, unsigned line, const char *predicate, const char *xStr, const char *x)

◆ 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,
const char *  yExpr,
y,
const char *  message 
)

Definition at line 145 of file TestSuite.h.

150 {
151 if ( !r( x, y ) ) {
152 if ( message )
153 tracker().failedTest( file, line, message );
154 tracker().failedAssertRelation( file, line, rExpr, xExpr, yExpr, TS_AS_STRING(x), TS_AS_STRING(y) );
155 TS_ABORT();
156 }
157 }
void failedAssertRelation(const char *file, unsigned line, const char *relation, const char *xStr, const char *yStr, const char *x, const char *y)

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

106 {
107 if ( !sameData( x, y, size ) ) {
108 if ( message )
109 tracker().failedTest( file, line, message );
110 tracker().failedAssertSameData( file, line, xExpr, yExpr, sizeExpr, x, y, size );
111 TS_ABORT();
112 }
113 }
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
void failedAssertSameData(const char *file, unsigned line, const char *xStr, const char *yStr, const char *sizeStr, const void *x, const void *y, unsigned size)
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.

74 {
75 if ( message )
76 tracker().failedTest( file, line, message );
77 tracker().failedAssert( file, line, expression );
78 TS_ABORT();
79 }
void failedAssert(const char *file, unsigned line, const char *expression)

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

119 {
120 if ( message )
121 tracker().failedTest( file, line, message );
122
123 tracker().failedAssertThrows( file, line, expr, type, otherThrown );
124 TS_ABORT();
125 }
void failedAssertThrows(const char *file, unsigned line, const char *expression, const char *type, bool otherThrown)

◆ doFailAssertThrowsNot()

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

Definition at line 127 of file TestSuite.cpp.

129 {
130 if ( message )
131 tracker().failedTest( file, line, message );
132
133 tracker().failedAssertThrowsNot( file, line, expression );
134 TS_ABORT();
135 }
void failedAssertThrowsNot(const char *file, unsigned line, const char *expression)

◆ doFailTest()

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

Definition at line 66 of file TestSuite.cpp.

67 {
68 tracker().failedTest( file, line, message );
69 TS_ABORT();
70 }

◆ doTrace()

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

Definition at line 56 of file TestSuite.cpp.

57 {
58 tracker().trace( file, line, message );
59 }
void trace(const char *file, unsigned line, const char *expression)

◆ doWarn()

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

Definition at line 61 of file TestSuite.cpp.

62 {
63 tracker().warning( file, line, message );
64 }
void warning(const char *file, unsigned line, const char *expression)

◆ dumpRange()

template<class Stream , class Iterator >
void CxxTest::dumpRange ( Stream &  s,
Iterator  first,
Iterator  last 
)

Definition at line 92 of file StdValueTraits.h.

93 {
94 s << "{ ";
95 while ( first != last ) {
96 s << TS_AS_STRING(*first);
97 ++ first;
98 s << ((first == last) ? " }" : ", ");
99 }
100 }
STATIC_VAR poly last
Definition: hdegree.cc:1173

◆ equals()

template<class X , class Y >
bool CxxTest::equals ( x,
y 
)

Definition at line 45 of file TestSuite.h.

46 {
47 return (x == y);
48 }

◆ initialize()

void CxxTest::initialize ( )

◆ leaveOnly()

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

Definition at line 304 of file RealDescriptions.cpp.

305 {
306 return RealWorldDescription().leaveOnly( suiteName, testName );
307 }
bool leaveOnly(const char *suiteName, const char *testName=0)

◆ lessThan()

template<class X , class Y >
bool CxxTest::lessThan ( x,
y 
)

Definition at line 91 of file TestSuite.h.

92 {
93 return (x < y);
94 }

◆ lessThanEquals()

template<class X , class Y >
bool CxxTest::lessThanEquals ( x,
y 
)

Definition at line 111 of file TestSuite.h.

112 {
113 return (x <= y);
114 }

◆ maxDumpSize()

unsigned CxxTest::maxDumpSize ( )

Definition at line 43 of file TestSuite.cpp.

44 {
45 return currentMaxDumpSize;
46 }
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.

119{ return n < 0; }

◆ sameData()

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

Definition at line 81 of file TestSuite.cpp.

82 {
83 if ( size == 0 )
84 return true;
85
86 if ( x == y )
87 return true;
88
89 if ( !x || !y )
90 return false;
91
92 const char *cx = (const char *)x;
93 const char *cy = (const char *)y;
94 while ( size -- )
95 if ( *cx++ != *cy++ )
96 return false;
97
98 return true;
99 }

◆ setAbortTestOnFail()

void CxxTest::setAbortTestOnFail ( bool  value)

Definition at line 25 of file TestSuite.cpp.

26 {
28 }

◆ setMaxDumpSize()

void CxxTest::setMaxDumpSize ( unsigned  value)

Definition at line 48 of file TestSuite.cpp.

49 {
50 currentMaxDumpSize = value;
51 }

◆ stringsEqual()

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

Definition at line 39 of file ValueTraits.cpp.

40 {
41 char c;
42 while ( (c = *s1++) == *s2++ )
43 if ( c == '\0' )
44 return true;
45 return false;
46 }

◆ tracker()

TestTracker & CxxTest::tracker ( )
inline

Definition at line 111 of file TestTracker.h.

111{ return TestTracker::tracker(); }

◆ traits()

template<class T >
ValueTraits< T > CxxTest::traits ( T  t)
inline

Definition at line 89 of file ValueTraits.h.

90 {
91 return ValueTraits<T>( t );
92 }

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.

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