HSHGTest Namespace Reference

namespace for the test framework More...


Classes

class  TestFailure
 An exception class representing a test assertion failure. More...
struct  TestFn
 Helper structure for defining named test functions. More...

Functions

void TestAssert (bool condition, const char *message, const char *file, unsigned int line)
 Throws a TestFailure exception if the given condition is false.
int RunTests (TestFn fnarray[], std::ostream &log)
 Runs a sequence of tests.


Detailed Description

namespace for the test framework

Function Documentation

int HSHGTest::RunTests ( TestFn  fnarray[],
std::ostream &  log 
) [inline]

Runs a sequence of tests.

Returns:
EXIT_SUCCESS if the list of tests was non-empty and there were no test failures, EXIT_FAILURE otherwise.
Parameters:
fnarray an array of TestFn structs terminated by a final entry whose fptr member is NULL
log an output stream for writing test output

void HSHGTest::TestAssert ( bool  condition,
const char *  message,
const char *  file,
unsigned int  line 
) [inline]

Throws a TestFailure exception if the given condition is false.


Generated on Wed Oct 31 00:18:54 2007 by  doxygen 1.5.2