CppUnit project page CppUnit home page

extendeddata.h

Go to the documentation of this file.
00001 #ifndef CPPUT_EXTENDEDDATA_H_INCLUDED
00002 # define CPPUT_EXTENDEDDATA_H_INCLUDED
00003 
00004 # include <cpput/forwards.h>
00005 # include <string>
00006 
00007 
00008 namespace CppUT {
00009 
00010 
00041 class TestExtendedDataHelper
00042 {
00043 public:
00044    TestExtendedDataHelper( Test &test );
00045    virtual ~TestExtendedDataHelper();
00046 
00047    Test &operator()( const TestExtendedData &data ) const;
00048 
00049 private:
00050    Test &test_;
00051 };
00052 
00053 
00056 class CPPUT_API TestExtendedData
00057 {
00058 public:
00059    virtual ~TestExtendedData();
00060 
00061    virtual void apply( Test &test ) const = 0;
00062 
00063    TestExtendedDataList operator ,( const TestExtendedData &other ) const;
00064 };
00065 
00066 
00069 class TestExtendedDataList : public TestExtendedData
00070 {
00071 public:
00072    TestExtendedDataList( const TestExtendedData &left,
00073                               const TestExtendedData &right );
00074 public: // overridden from TestExtendedData
00075    void apply( Test &test ) const;
00076 
00077 private:
00078    const TestExtendedData &left_;
00079    const TestExtendedData &right_;
00080 };
00081 
00082 
00085 class CPPUT_API DescriptionData : public TestExtendedData
00086 {
00087 public:
00088    DescriptionData( const std::string &description );
00089 
00090 public: // overridden from TestExtendedData
00091    void apply( Test &test ) const;
00092 
00093 private:
00094    std::string description_;
00095 };
00096 
00097 
00100 class CPPUT_API TimeOutData : public TestExtendedData
00101 {
00102 public:
00103    TimeOutData( double timeOutInSeconds );
00104 
00105 public: // overridden from TestExtendedData
00106    void apply( Test &test ) const;
00107 
00108 private:
00109    double timeOutInSeconds_;
00110 };
00111 
00112 
00115 class CPPUT_API DependenciesData : public TestExtendedData
00116 {
00117 public:
00118    DependenciesData(  const std::string &dependencies  );
00119 
00120 public: // overridden from TestExtendedData
00121    void apply( Test &test ) const;
00122 private:
00123    std::string dependencies_;
00124 };
00125 
00126 
00129 class CPPUT_API GroupData : public TestExtendedData
00130 {
00131 public:
00132    GroupData(  const std::string &groupName );
00133 
00134 public: // overridden from TestExtendedData
00135    void apply( Test &test ) const;
00136 private:
00137    std::string groupName_;
00138 };
00139 
00140 
00143 class CPPUT_API TestExtendedDataFactory
00144 {
00145 public:
00146    virtual ~TestExtendedDataFactory();
00147 
00148    static DescriptionData describe( const std::string &description );
00149 
00150    static TimeOutData timeOut( double timeOutInSeconds );
00151 
00152    static DependenciesData depends( const std::string &dependencies );
00153 
00154    static GroupData group( const std::string &groupName );
00155 };
00156 
00157 
00158 } // namespace CppUT
00159 
00160 
00161 #endif // CPPUT_EXTENDEDDATA_H_INCLUDED

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