CppUnit project page CppUnit home page

testsuite.h

Go to the documentation of this file.
00001 #ifndef CPPUT_TESTSUITE_H_INCLUDED
00002 # define CPPUT_TESTSUITE_H_INCLUDED
00003 
00004 # include <cpput/test.h>
00005 # include <deque>
00006 
00007 
00008 namespace CppUT {
00009 
00013 class CPPUT_API AbstractTestSuite : public Test
00014 {
00015 public:
00016    AbstractTestSuite();
00017 
00018    AbstractTestSuite( const std::string &name );
00019 
00020    virtual int testCount() const = 0;
00021 
00022    virtual TestPtr testAt( int index ) const = 0;
00023 
00024 public: // overridden from Test
00025    void accept( TestVisitor &visitor );
00026 
00028    bool isTestCase() const;
00029 };
00030 
00031 
00035 class CPPUT_API TestSuite : public AbstractTestSuite
00036 {
00037 public:
00038    TestSuite( const std::string &name );
00039 
00040    void add( const TestPtr &test );
00041 
00042    void add( const TestSuitePtr &test );
00043 
00044 // overridden from AbstractTestSuite
00045    int testCount() const;
00046 
00047    TestPtr testAt( int index ) const;
00048 
00049 private:
00050    typedef std::deque<TestPtr> Tests;
00051    Tests tests_;
00052 };
00053 
00054 
00058 TestSuitePtr CPPUT_API makeTestSuite( const std::string &name );
00059 
00060 } // namespace CppUT
00061 
00062 
00063 
00064 #endif // CPPUT_TESTSUITE_H_INCLUDED

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