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  

TestSuite.h

Go to the documentation of this file.
00001 #ifndef CPPUNIT_TESTSUITE_H    // -*- C++ -*-
00002 #define CPPUNIT_TESTSUITE_H
00003 
00004 #include <cppunit/Portability.h>
00005 
00006 #if CPPUNIT_NEED_DLL_DECL
00007 #pragma warning( push )
00008 #pragma warning( disable: 4251 )  // X needs to have dll-interface to be used by clients of class Z
00009 #endif
00010 
00011 #include <cppunit/Test.h>
00012 #include <vector>
00013 #include <string>
00014 
00015 namespace CppUnit {
00016 
00017 class TestResult;
00018 
00019 #if CPPUNIT_NEED_DLL_DECL
00020   template class CPPUNIT_API std::vector<Test *>;
00021 #endif
00022 
00023 
00044 class CPPUNIT_API TestSuite : public Test
00045 {
00046 public:
00047   TestSuite( std::string name = "" );
00048   ~TestSuite();
00049 
00050   void run( TestResult *result );
00051   int countTestCases() const;
00052   std::string getName() const;
00053   std::string toString() const;
00054 
00055   void addTest( Test *test );
00056   const std::vector<Test *> &getTests() const;
00057 
00058   virtual void deleteContents();
00059 
00060 private:
00061   TestSuite( const TestSuite &other );
00062   TestSuite &operator =( const TestSuite &other ); 
00063 
00064 private:
00065   std::vector<Test *> m_tests;
00066   const std::string m_name;
00067 };
00068 
00069 
00070 } // namespace CppUnit
00071 
00072 
00073 #if CPPUNIT_NEED_DLL_DECL
00074 #pragma warning( pop )
00075 #endif
00076 
00077 #endif // CPPUNIT_TESTSUITE_H

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