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

TestSuite.hh

Go to the documentation of this file.
00001 /* -*- Mode:C++ -*- */
00002 #ifndef TESTSUITE_HH
00003 #define TESTSUITE_HH
00004 
00005 #include "TestForward.hh"
00006 #include "TestComponent.hh"
00007 #include "TestSuiteFormatter.hh"
00008 #include "UnitTest.hh"
00009 #include <string>
00010 #include <iosfwd>
00011 
00012 #include <list>
00013 
00014 namespace ccunit
00015 {
00016 
00044 class TestSuite : public TestComponent
00045 {
00046 public:
00047   // Expection Classes
00048 
00050   TestSuite(const string &name = "(no name)",
00051             TestSuiteFormatterPtr formatter = TestSuiteFormatterPtr(new TestSuiteFormatter()));
00052 
00053   virtual ~TestSuite() {}
00054 
00056   virtual void report(ostream &ostr);
00057 
00059   virtual void Add(TestComponentPtr child);
00060 
00062   virtual void Remove(TestComponentPtr child);
00063 
00065   virtual bool CheckRecursion(TestComponent *target) const;
00066 
00068   virtual void setFormatter(TestSuiteFormatterPtr fmt_p);
00069 
00070 protected:
00072   virtual void run_tests();
00073 
00074 private:
00076   typedef list<TestComponentPtr> TEST_LIST_t;
00077 
00079   TEST_LIST_t m_tests;
00080 
00082   virtual void reset();
00083 
00084   // Disallowed ops:
00085   TestSuite(const TestSuite&);
00086   TestSuite& operator=(const TestSuite&);
00087 
00089   TestSuiteFormatterPtr mp_formatter;
00090 };
00091 
00092 }
00093 
00094 #endif /* TESTSUITE_HH */

Generated on Tue Apr 2 15:33:23 2002 for libccunit by doxygen 1.2.14 written by Dimitri van Heesch, © 1997-2002

Project hosted on sourceforge SourceForge Logo