#include <Tester.h>
Public Member Functions | |
Tester () | |
Tester (int argc, char **argv) | |
~Tester () | |
Inform & | out () |
bool | ok () const |
int | returnValue () const |
bool | check (bool val) |
bool | check (const char *str, bool val) |
template<class T > | |
bool | check (const char *str, const T &val, const T &correct) |
template<class T > | |
bool | check (const char *str, const T &val, const T &correct, const T &tol) |
void | set (bool val) |
void | setQuiet (bool quiet) |
void | setVerbose (bool verbose) |
bool | verbose () |
void | setPrefix (char *prefix) |
int | results (const char *msg=0) const |
void | exceptionHandler (const char *msg=0) |
void | exceptionHandler (const Assertion &asrt) |
It provides:
You use Tester in this way:
int retval = tester.results("My current test."); Pooma::finalize(); return retval;
The optional command-line arguments that Tester understands are: (these will NOT be stripped from the argc, argv given to Tester in its constructor)
Pooma::Tester::Tester | ( | ) |
Pooma::Tester::Tester | ( | int | argc, | |
char ** | argv | |||
) |
Pooma::Tester::~Tester | ( | ) |
Inform& Pooma::Tester::out | ( | ) | [inline] |
Referenced by check(), setPrefix(), setQuiet(), and setVerbose().
bool Pooma::Tester::ok | ( | ) | const [inline] |
Referenced by returnValue().
int Pooma::Tester::returnValue | ( | ) | const [inline] |
References ok().
bool Pooma::Tester::check | ( | const char * | str, | |
bool | val | |||
) | [inline] |
References check(), std::endl(), and out().
bool Pooma::Tester::check | ( | const char * | str, | |
const T & | val, | |||
const T & | correct | |||
) | [inline] |
References check(), std::endl(), and out().
bool Pooma::Tester::check | ( | const char * | str, | |
const T & | val, | |||
const T & | correct, | |||
const T & | tol | |||
) | [inline] |
References abs(), check(), std::endl(), and out().
void Pooma::Tester::set | ( | bool | val | ) | [inline] |
void Pooma::Tester::setQuiet | ( | bool | quiet | ) | [inline] |
References Inform::off, Inform::on, out(), and Inform::setOutputLevel().
void Pooma::Tester::setVerbose | ( | bool | verbose | ) | [inline] |
References Inform::off, Inform::on, out(), and Inform::setOutputLevel().
bool Pooma::Tester::verbose | ( | ) | [inline] |
void Pooma::Tester::setPrefix | ( | char * | prefix | ) | [inline] |
References out(), and Inform::setPrefix().
int Pooma::Tester::results | ( | const char * | msg = 0 |
) | const |
void Pooma::Tester::exceptionHandler | ( | const char * | msg = 0 |
) |
void Pooma::Tester::exceptionHandler | ( | const Assertion & | asrt | ) |