TestInternal Namespace Reference

## Classes

struct | StdData

## Functions

void | assertOK (const StdData &data)
void | assertFail (const char *cond, const char *expected, const StdData &data)
void | assertFail1 (const char *cond, const char *expected, const StdData &data, const char *exp1, string exp1Value)
void | assertFail2 (const char *cond, const char *expected, const StdData &data, const char *exp1, string exp1Value, const char *exp2, string exp2Value)
void | assertSucceeded (bool printDot)
void | assertFailed (const char *errorMsg, const char *testName, const char *file, size_t line)
void | assertFailed2 (const char *errorMsg, const char *testName, const char *file, size_t line, const char *expression1, const char *expression1Value, const char *expression2, const char *expression2Value)
void | assertTrue (bool value, const char *valueString, const char *testName, const char *file, size_t line, bool printDot)
void | assertTrue2Failed (const char *valueString, const char *testName, const char *file, size_t line, const char *expression1, const char *expression1Value, const char *expression2, const char *expression2Value)
void | assertFalse (bool value, const char *valueString, const char *testName, const char *file, size_t line, bool printDot)
void | assertEqualFailed (const char *a, const char *b, const char *aString, const char *bString, const char *testName, const char *file, size_t line)
void | assertNotEqualFailed (const char *a, const char *b, const char *aString, const char *bString, const char *testName, const char *file, size_t line)
template<class T>
string | toStr (const T &t)
template<class T>
ostream & | operator<< (ostream &out, const vector< T > &v)
| Prints out a vector.
template<class A, class B>
void | assertTrue2 (bool value, const char *valueString, const char *testName, const char *file, size_t line, const char *expression1, const A &a, const char *expression2, const B &b, bool printDot)
template<class T1, class T2>
void | assertEqual (const T1 &a, const T2 &b, const char *aString, const char *bString, const char *testName, const char *file, size_t line, bool printDot)
template<class T1, class T2>
void | assertNotEqual (const T1 &a, const T2 &b, const char *aString, const char *bString, const char *testName, const char *file, size_t line, bool printDot)

## Function Documentation

## assertEqual()

template<class T1, class T2>

void TestInternal::assertEqual | ( | const T1 & | a,
|  | const T2 & | b,
|  | const char * | aString,
|  | const char * | bString,
|  | const char * | testName,
|  | const char * | file,
|  | size_t | line,
|  | bool | printDot )

Definition at line 133 of file asserts.h.

## assertEqualFailed()

void TestInternal::assertEqualFailed | ( | const char * | a,
|  | const char * | b,
|  | const char * | aString,
|  | const char * | bString,
|  | const char * | testName,
|  | const char * | file,
|  | size_t | line )

Definition at line 191 of file asserts.cpp.

## assertFail()

void TestInternal::assertFail | ( | const char * | cond,
|  | const char * | expected,
|  | const StdData & | data )

Definition at line 38 of file asserts.cpp.

## assertFail1()

void TestInternal::assertFail1 | ( | const char * | cond,
|  | const char * | expected,
|  | const StdData & | data,
|  | const char * | exp1,
|  | string | exp1Value )

Definition at line 59 of file asserts.cpp.

## assertFail2()

void TestInternal::assertFail2 | ( | const char * | cond,
|  | const char * | expected,
|  | const StdData & | data,
|  | const char * | exp1,
|  | string | exp1Value,
|  | const char * | exp2,
|  | string | exp2Value )

Definition at line 83 of file asserts.cpp.

## assertFailed()

void TestInternal::assertFailed | ( | const char * | errorMsg,
|  | const char * | testName,
|  | const char * | file,
|  | size_t | line )

Definition at line 117 of file asserts.cpp.

## assertFailed2()

void TestInternal::assertFailed2 | ( | const char * | errorMsg,
|  | const char * | testName,
|  | const char * | file,
|  | size_t | line,
|  | const char * | expression1,
|  | const char * | expression1Value,
|  | const char * | expression2,
|  | const char * | expression2Value )

Definition at line 141 of file asserts.cpp.

## assertFalse()

void TestInternal::assertFalse | ( | bool | value,
|  | const char * | valueString,
|  | const char * | testName,
|  | const char * | file,
|  | size_t | line,
|  | bool | printDot )

Definition at line 178 of file asserts.cpp.

## assertNotEqual()

template<class T1, class T2>

void TestInternal::assertNotEqual | ( | const T1 & | a,
|  | const T2 & | b,
|  | const char * | aString,
|  | const char * | bString,
|  | const char * | testName,
|  | const char * | file,
|  | size_t | line,
|  | bool | printDot )

Definition at line 161 of file asserts.h.

## assertNotEqualFailed()

void TestInternal::assertNotEqualFailed | ( | const char * | a,
|  | const char * | b,
|  | const char * | aString,
|  | const char * | bString,
|  | const char * | testName,
|  | const char * | file,
|  | size_t | line )

Definition at line 202 of file asserts.cpp.

## assertOK()

void TestInternal::assertOK | ( | const StdData & | data | ) |

Definition at line 31 of file asserts.cpp.

## assertSucceeded()

void TestInternal::assertSucceeded | ( | bool | printDot | ) |

Definition at line 110 of file asserts.cpp.

## assertTrue()

void TestInternal::assertTrue | ( | bool | value,
|  | const char * | valueString,
|  | const char * | testName,
|  | const char * | file,
|  | size_t | line,
|  | bool | printDot )

Definition at line 154 of file asserts.cpp.

## assertTrue2()

template<class A, class B>

void TestInternal::assertTrue2 | ( | bool | value,
|  | const char * | valueString,
|  | const char * | testName,
|  | const char * | file,
|  | size_t | line,
|  | const char * | expression1,
|  | const A & | a,
|  | const char * | expression2,
|  | const B & | b,
|  | bool | printDot )

Definition at line 96 of file asserts.h.

## assertTrue2Failed()

void TestInternal::assertTrue2Failed | ( | const char * | valueString,
|  | const char * | testName,
|  | const char * | file,
|  | size_t | line,
|  | const char * | expression1,
|  | const char * | expression1Value,
|  | const char * | expression2,
|  | const char * | expression2Value )

Definition at line 167 of file asserts.cpp.

## operator<<()

template<class T>

ostream & TestInternal::operator<< | ( | ostream & | out,
|  | const vector< T > & | v )

Prints out a vector.

This is useful when vectors are used in tests. The operator is only defined in this namespace so it does not escape to pollute the global namespce.

Definition at line 189 of file asserts.h.

## toStr()

template<class T>

string TestInternal::toStr | ( | const T & | t | ) |

Definition at line 47 of file asserts.h.