diff options
author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-06-11 18:56:23 +0000 |
---|---|---|
committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2001-06-11 18:56:23 +0000 |
commit | 0c5051a8acf83fd77a6094177eb0711d3f90d997 (patch) | |
tree | a0757b1cae952576f4497d40ccf3aa70a2bf84c8 /examples/cppunittest/FailingTestCase.h | |
parent | 021d0a2611777a06d948735e0ad36cb90ffd413b (diff) | |
download | cppunit-0c5051a8acf83fd77a6094177eb0711d3f90d997.tar.gz |
Examples/cppunittest/TestResultTest.
examples/cppunittest/TestResultTest.*: renamed TestListenerTest.*
* examples/cppunittest/*: added unit tests for:
HelperMacros, TestAssert, TestCaller, TestCase, TestFailure,
TestResult, TestSuite, TestDecoratorTest, TestSetUp, RepeatedTestTest,
Orthodox, Exception.
Diffstat (limited to 'examples/cppunittest/FailingTestCase.h')
-rw-r--r-- | examples/cppunittest/FailingTestCase.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/examples/cppunittest/FailingTestCase.h b/examples/cppunittest/FailingTestCase.h new file mode 100644 index 0000000..2ac52b5 --- /dev/null +++ b/examples/cppunittest/FailingTestCase.h @@ -0,0 +1,42 @@ +#ifndef FAILINGTESTCASE_H +#define FAILINGTESTCASE_H + +#include <cppunit/TestCase.h> +#include "FailureException.h" + + +class FailingTestCase : public CppUnit::TestCase +{ +public: + FailingTestCase( bool failSetUp =false, + bool failRunTest =false, + bool failTearDown =false ); + + virtual ~FailingTestCase(); + + virtual void setUp(); + virtual void tearDown(); + + virtual void runTest(); + + void verify( bool runTestCalled =true, + bool tearDownCalled =true); + +private: + FailingTestCase( const FailingTestCase © ); + void operator =( const FailingTestCase © ); + + void doFailure( bool shouldFail ); + +private: + bool m_failSetUp; + bool m_failRunTest; + bool m_failTearDown; + + bool m_setUpCalled; + bool m_runTestCalled; + bool m_tearDownCalled; +}; + + +#endif // FAILINGTESTCASE_H |