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

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 <cppunit/TestFixture.h>
00008 #include <string>
00009 
00010 
00011 namespace CppUnit {
00012 
00013 class TestResult;
00014 
00015 
00026 class CPPUNIT_API TestCase : public Test,
00027                              public TestFixture
00028 {
00029 public:
00030 
00031     TestCase( std::string Name );
00033     TestCase();
00034     ~TestCase();
00035     
00036     virtual void run(TestResult *result);
00037     virtual int countTestCases() const;
00038     std::string getName() const;
00039     std::string toString() const;
00040 
00042     virtual TestResult *run();
00043     
00044 protected:
00046     virtual void runTest();
00047 
00049     TestResult *defaultResult();
00050     
00051 private:
00052     TestCase( const TestCase &other ); 
00053     TestCase &operator=( const TestCase &other ); 
00054     
00055 private:
00056     const std::string m_name;
00057 };
00058 
00059 } // namespace CppUnit
00060 
00061 #endif // CPPUNIT_TESTCASE_H 

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