#include <UnitTest.hh>
Inheritance diagram for ccunit::UnitTest:
Public Methods | |
UnitTest (const string &name="(no name)") | |
ctor -- set pass/fail counters to zero. More... | |
virtual | ~UnitTest () |
dtor -- does nothing. More... | |
virtual void | report (ostream &ostr) |
Print a report on an output stream. More... | |
void | _succeed () |
Called when a test succeeds (increments pass counter). More... | |
Protected Methods | |
bool | do_test (bool cond, const std::string &lbl, const char *fname, const char *fnt_name, long lineno) |
void | do_fail (const std::string &lbl, const char *fname, const char *fnt_name, long lineno) |
virtual void | run_tests ()=0 |
override this to actually run tests; call TestComponent::run() to execute tests. More... | |
Private Methods | |
UnitTest (const UnitTest &) | |
UnitTest & | operator= (const UnitTest &) |
#
The UnitTest class is the basic building block for the testing framework. Users of this class are expected to derive classes based on this class, but specific to a testing a particular classes. (That sounds awful).
Revision 1.2 2002/03/29 20:15:06 canislupus Moving to doxygen (continued).
Revision 1.1.1.1 2002/03/28 20:16:56 canislupus
Revision 1.1 2001/04/12 17:47:14 dhawkins Initial checkin.
\end{verbatim}
Definition at line 79 of file UnitTest.hh.
|
ctor -- set pass/fail counters to zero.
Definition at line 131 of file UnitTest.hh. |
|
dtor -- does nothing.
Definition at line 86 of file UnitTest.hh. |
|
|
|
Called when a test succeeds (increments pass counter).
Definition at line 138 of file UnitTest.hh. References ccunit::TestComponent::m_nPass. Referenced by do_test, StackTest::testBadSize, StackTest::testOverflow, StackTest::testPopulate, and StackTest::testUnderflow. |
|
Create a failure
Definition at line 29 of file UnitTest.cc. References ccunit::TestComponent::m_failures, and ccunit::TestComponent::m_nFail. Referenced by do_test. |
|
Execute a test.
Definition at line 15 of file UnitTest.cc. |
|
|
|
Print a report on an output stream.
Implements ccunit::TestComponent. Definition at line 37 of file UnitTest.cc. References ccunit::TestComponent::checkRun, ccunit::TestComponent::m_failures, ccunit::TestComponent::m_hasRun, ccunit::TestComponent::m_nFail, and ccunit::TestComponent::m_nPass. |
|
override this to actually run tests; call TestComponent::run() to execute tests.
Implements ccunit::TestComponent. Implemented in StackTest. |