CppUnit project page FAQ CppUnit home page

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

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/Test.h>
00005 
00006 namespace CppUnit {
00007 
00008 class TestResult;
00009 
00010 
00019 class TestDecorator : public Test 
00020 {
00021 public:
00022     TestDecorator   (Test *test);
00023     ~TestDecorator  ();
00024 
00025     void        run             (TestResult *result);
00026     int         countTestCases  () const;
00027     std::string getName         () const;
00028     std::string toString        () const;
00029 
00030 protected:
00031     Test        *m_test;
00032 
00033 private:
00034     TestDecorator( const TestDecorator &);
00035     void operator =( const TestDecorator & );
00036 };
00037 
00038 
00039 inline TestDecorator::TestDecorator (Test *test)
00040 { m_test = test; }
00041 
00042 
00043 inline TestDecorator::~TestDecorator ()
00044 {}
00045 
00046 
00047 inline int TestDecorator::countTestCases () const
00048 { return m_test->countTestCases (); }
00049 
00050 
00051 inline void TestDecorator::run (TestResult *result)
00052 { m_test->run (result); }
00053 
00054 
00055 inline std::string TestDecorator::toString () const
00056 { return m_test->toString (); }
00057 
00058 
00059 inline std::string TestDecorator::getName () const
00060 { return m_test->getName(); }
00061 
00062 } // namespace CppUnit
00063 
00064 #endif
00065 

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