CppUnit project page | FAQ

TestCaseDecorator.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_EXTENSIONS_TESTCASEDECORATOR_H
2 #define CPPUNIT_EXTENSIONS_TESTCASEDECORATOR_H
3
4 #include <cppunit/Portability.h>
5 #include <cppunit/TestCase.h>
6
7 CPPUNIT_NS_BEGIN
8
9
18 class CPPUNIT_API TestCaseDecorator : public TestCase
19 {
20 public:
21 TestCaseDecorator( TestCase *test );
22 ~TestCaseDecorator();
23
24 std::string getName() const;
25
26 void setUp();
27
28 void tearDown();
29
30 void runTest();
31
32 protected:
33 TestCase *m_test;
34
35 private:
36
37 //prevent the creation of copy c'tor and operator=
38 TestCaseDecorator( const TestCaseDecorator& );
39 TestCaseDecorator& operator=( const TestCaseDecorator& );
40
41 };
42
43
44 CPPUNIT_NS_END
45
46 #endif
47
TestCase::getName
std::string getName() const
Returns the name of the test case.
Definition: TestCase.cpp:131
Portability.h
TestCase::operator=
TestCase & operator=(const TestCase &other)
TestFixture::tearDown
virtual void tearDown()
Clean up after the test run.
Definition: TestFixture.h:92
TestCaseDecorator::m_test
TestCase * m_test
Definition: TestCaseDecorator.h:33
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition: Portability.h:120
TestCase::runTest
virtual void runTest()
FIXME: this should probably be pure virtual.
Definition: TestCase.cpp:105
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
TestFixture::setUp
virtual void setUp()
Set up context before running a test.
Definition: TestFixture.h:89
TestCase.h
TestCase
A single test object.
Definition: TestCase.h:27
TestCaseDecorator
Decorator for Test cases.
Definition: TestCaseDecorator.h:18
CPPUNIT_API
#define CPPUNIT_API
Definition: CppUnitApi.h:27

| Send comments to: CppUnit Developers