#include <AutoTest.hh>
Inheritance diagram for ccunit::AutoTestSuite:
Public Methods | |
virtual void | Add (TestComponentPtr child) |
Calls the super classes Add function. Ensures tests will be run. More... | |
Static Public Methods | |
AutoTestSuite & | instance () |
Singleton access. More... | |
void | finish () |
function to register with _atexit (way cool...). More... | |
Private Methods | |
AutoTestSuite () | |
AutoTestSuite (const AutoTestSuite &) | |
AutoTestSuite & | operator= (const AutoTestSuite &) |
The purpose of this class is to eliminate some of the boiler-plate code used to create a test runner (i.e., RunTests.cc). This code allows tests to be registered, and run automatically.
Test classes (UnitTest) are added using ccunit::registerTest<T>(), where T is the class type.
Once one or more test classes are registered, then the program will automatically run and print the results on exit.
<note>If this level of automation is not to your liking, then all tests can be collected and run manually as in RunTests.cc.</note>
The use of the auto test functionality is demonstrated in AutoTestTest.hh, AutoTestTest.cc, and AutoTestMain.cc.
Definition at line 29 of file AutoTest.hh.
|
Definition at line 9 of file AutoTest.cc. Referenced by instance. |
|
|
|
Calls the super classes Add function. Ensures tests will be run.
Reimplemented from ccunit::TestSuite. Definition at line 22 of file AutoTest.cc. References ccunit::TestComponentPtr. |
|
function to register with _atexit (way cool...).
Definition at line 36 of file AutoTest.cc. |
|
Singleton access.
Definition at line 15 of file AutoTest.cc. References AutoTestSuite. Referenced by main. |
|
|