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  

TestCase.h

Go to the documentation of this file.
00001 #ifndef CPPUNIT_TESTCASE_H
00002 #define CPPUNIT_TESTCASE_H
00003 
00004 #include <cppunit/Portability.h>
00005 #include <cppunit/Test.h>
00006 #include <cppunit/TestAssert.h>
00007 #include <string>
00008 
00009 
00010 namespace CppUnit {
00011 
00012 class TestResult;
00013 
00014 
00015 /* FIXME: most of this documentation belongs to proposed class Fixture.
00016  */
00017 
00092 class TestCase : public Test
00093 {
00094 public:
00095 
00096     TestCase         (std::string Name);
00098     TestCase         ();
00099     ~TestCase        ();
00100     
00101     virtual void        run              (TestResult *result);
00102     virtual int         countTestCases   () const;
00103     std::string         getName          () const;
00104     std::string         toString         () const;
00105 
00107     virtual TestResult  *run             ();
00108 
00109     // FIXME: move back to class TestFixture, in future.
00110     virtual void        setUp            ();
00111     virtual void        tearDown         ();
00112  
00113     
00114 protected:
00116     virtual void        runTest          ();
00117 
00119     TestResult          *defaultResult   ();
00120     
00121 private:
00122     TestCase (const TestCase& other); 
00123     TestCase& operator= (const TestCase& other); 
00124     
00125 private:
00126     const std::string   m_name;
00127 };
00128 
00129 } // namespace CppUnit
00130 
00131 #endif // CPPUNIT_TESTCASE_H 

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