MOAB: Mesh Oriented datABase
(version 5.4.1)
|
A class the runs cppunit tests, outputs results in an organized manner. More...
#include <MesquiteTestRunner.hpp>
Public Member Functions | |
TestRunner () | |
virtual | ~TestRunner () |
void | add_test (CppUnit::Test *test) |
virtual bool | run (const std::string &name_of_run, std::ostream &out_stream=std::cout) |
Protected Member Functions | |
void | delete_all_tests () |
const std::string | running_test_prefix () |
void | indent () |
virtual void | startSuite (CppUnit::TestSuite *suite) |
virtual void | startTest (CppUnit::Test *test) |
virtual void | addFailure (const CppUnit::TestFailure &failure) |
virtual void | endTest (CppUnit::Test *test) |
virtual void | endSuite (CppUnit::TestSuite *suite) |
void | push_timer (Mesquite::Timer *timer) |
MBMesquite::Timer * | pop_timer () |
Private Attributes | |
std::vector< CppUnit::Test * > | mTests |
std::stack< Mesquite::Timer * > | mTimers |
std::stack< int > | failureCounters |
std::vector< std::string > | failedTestNames |
std::ostream * | mOut |
CppUnit::TestResult * | myResult |
unsigned int | indentLevel |
unsigned int | numSuccesses |
unsigned int | numFailures |
unsigned int | numExceptions |
Static Private Attributes | |
static const unsigned char | INDENT_SIZE |
A class the runs cppunit tests, outputs results in an organized manner.
The test runner manages the life cycle of the added tests.
Here is an example of use:
MBMesquite::TestRunner runner; runner.addTest( ExampleTestCase::suite() ); runner.run( "Darryl's Test Run" ); // Run all tests and wait
Definition at line 56 of file MesquiteTestRunner.hpp.
virtual MBMesquite::TestRunner::~TestRunner | ( | ) | [virtual] |
void MBMesquite::TestRunner::add_test | ( | CppUnit::Test * | test | ) |
virtual void MBMesquite::TestRunner::addFailure | ( | const CppUnit::TestFailure & | failure | ) | [protected, virtual] |
void MBMesquite::TestRunner::delete_all_tests | ( | ) | [protected] |
virtual void MBMesquite::TestRunner::endSuite | ( | CppUnit::TestSuite * | suite | ) | [protected, virtual] |
virtual void MBMesquite::TestRunner::endTest | ( | CppUnit::Test * | test | ) | [protected, virtual] |
void MBMesquite::TestRunner::indent | ( | ) | [inline, protected] |
MBMesquite::Timer* MBMesquite::TestRunner::pop_timer | ( | ) | [inline, protected] |
void MBMesquite::TestRunner::push_timer | ( | Mesquite::Timer * | timer | ) | [inline, protected] |
virtual bool MBMesquite::TestRunner::run | ( | const std::string & | name_of_run, |
std::ostream & | out_stream = std::cout |
||
) | [virtual] |
const std::string MBMesquite::TestRunner::running_test_prefix | ( | ) | [protected] |
virtual void MBMesquite::TestRunner::startSuite | ( | CppUnit::TestSuite * | suite | ) | [protected, virtual] |
virtual void MBMesquite::TestRunner::startTest | ( | CppUnit::Test * | test | ) | [protected, virtual] |
std::vector< std::string > MBMesquite::TestRunner::failedTestNames [private] |
Definition at line 85 of file MesquiteTestRunner.hpp.
std::stack< int > MBMesquite::TestRunner::failureCounters [private] |
Definition at line 84 of file MesquiteTestRunner.hpp.
const unsigned char MBMesquite::TestRunner::INDENT_SIZE [static, private] |
Definition at line 92 of file MesquiteTestRunner.hpp.
unsigned int MBMesquite::TestRunner::indentLevel [private] |
Definition at line 88 of file MesquiteTestRunner.hpp.
std::ostream* MBMesquite::TestRunner::mOut [private] |
Definition at line 86 of file MesquiteTestRunner.hpp.
std::vector< CppUnit::Test* > MBMesquite::TestRunner::mTests [private] |
Definition at line 82 of file MesquiteTestRunner.hpp.
std::stack< Mesquite::Timer* > MBMesquite::TestRunner::mTimers [private] |
Definition at line 83 of file MesquiteTestRunner.hpp.
CppUnit::TestResult* MBMesquite::TestRunner::myResult [private] |
Definition at line 87 of file MesquiteTestRunner.hpp.
unsigned int MBMesquite::TestRunner::numExceptions [private] |
Definition at line 91 of file MesquiteTestRunner.hpp.
unsigned int MBMesquite::TestRunner::numFailures [private] |
Definition at line 90 of file MesquiteTestRunner.hpp.
unsigned int MBMesquite::TestRunner::numSuccesses [private] |
Definition at line 89 of file MesquiteTestRunner.hpp.