CppUnit project page FAQ CppUnit home page

Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

TestDecorator.h

Go to the documentation of this file.
00001 #ifndef CPPUNIT_EXTENSIONS_TESTDECORATOR_H
00002 #define CPPUNIT_EXTENSIONS_TESTDECORATOR_H
00003 
00004 #include <cppunit/Portability.h>
00005 #include <cppunit/Test.h>
00006 
00007 namespace CppUnit {
00008 
00009 class TestResult;
00010 
00011 
00020 class CPPUNIT_API TestDecorator : public Test 
00021 {
00022 public:
00023     TestDecorator   (Test *test);
00024     ~TestDecorator  ();
00025 
00026     void        run             (TestResult *result);
00027     int         countTestCases  () const;
00028     std::string getName         () const;
00029     std::string toString        () const;
00030 
00031 protected:
00032     Test        *m_test;
00033 
00034 private:
00035     TestDecorator( const TestDecorator &);
00036     void operator =( const TestDecorator & );
00037 };
00038 
00039 
00040 inline TestDecorator::TestDecorator (Test *test)
00041 { m_test = test; }
00042 
00043 
00044 inline TestDecorator::~TestDecorator ()
00045 {}
00046 
00047 
00048 inline int TestDecorator::countTestCases () const
00049 { return m_test->countTestCases (); }
00050 
00051 
00052 inline void TestDecorator::run (TestResult *result)
00053 { m_test->run (result); }
00054 
00055 
00056 inline std::string TestDecorator::toString () const
00057 { return m_test->toString (); }
00058 
00059 
00060 inline std::string TestDecorator::getName () const
00061 { return m_test->getName(); }
00062 
00063 } // namespace CppUnit
00064 
00065 #endif
00066 

SourceForge Logo hosts this site. Send comments to:
CppUnit Developers