diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-06-01 18:34:42 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-06-01 18:34:42 +0000 |
| commit | 8c24e60a1c43fc24ee65618155795037770b5196 (patch) | |
| tree | 753bbfb0a0ddf015a9694e6ae3890bc0ca84f5de /examples/cppunittest/TrackedTestCase.cpp | |
| parent | bc6338edfd9b10327c83142fef1e427c5cb3e80f (diff) | |
| download | cppunit-8c24e60a1c43fc24ee65618155795037770b5196.tar.gz | |
Added project cppunittest to examples/: unit tests to test cppunit.
added project cppunittest to examples/: unit tests to test cppunit. The
main file is CppUnitTestMain.cpp. Unit tests have been implemented
for TestCaller and TestListener.
* added project CppUnitTestApp to examples/msvc6: graphical runner for
cppunittest.
* added TestListener to TestResult. It is a port of junit TestListener.
* updated some .cvsignore to ignore files generated with VC++.
Diffstat (limited to 'examples/cppunittest/TrackedTestCase.cpp')
| -rw-r--r-- | examples/cppunittest/TrackedTestCase.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/examples/cppunittest/TrackedTestCase.cpp b/examples/cppunittest/TrackedTestCase.cpp new file mode 100644 index 0000000..37d3c42 --- /dev/null +++ b/examples/cppunittest/TrackedTestCase.cpp @@ -0,0 +1,54 @@ +#include "TrackedTestCase.h" + +Tracker *TrackedTestCase::ms_tracker = NULL; + +TrackedTestCase::TrackedTestCase() +{ + if ( ms_tracker != NULL ) + ms_tracker->onConstructor(); +} + + +TrackedTestCase::~TrackedTestCase() +{ + if ( ms_tracker != NULL ) + ms_tracker->onDestructor(); +} + + +void +TrackedTestCase::setUp() +{ + if ( ms_tracker != NULL ) + ms_tracker->onSetUp(); +} + + +void +TrackedTestCase::tearDown() +{ + if ( ms_tracker != NULL ) + ms_tracker->onTearDown(); +} + + +void +TrackedTestCase::test() +{ + if ( ms_tracker != NULL ) + ms_tracker->onTest(); +} + + +void +TrackedTestCase::setTracker( Tracker *tracker ) +{ + ms_tracker = tracker; +} + + +void +TrackedTestCase::removeTracker() +{ + ms_tracker = NULL; +} |
