CppUnit project page FAQ CppUnit home page

TestCase.h
Go to the documentation of this file.
1 #ifndef CPPUNIT_TESTCASE_H
2 #define CPPUNIT_TESTCASE_H
3 
4 #include <cppunit/Portability.h>
5 #include <cppunit/TestLeaf.h>
6 #include <cppunit/TestAssert.h>
7 #include <cppunit/TestFixture.h>
8 #include <string>
9 
10 #if CPPUNIT_NEED_DLL_DECL
11 #pragma warning( push )
12 #pragma warning( disable: 4251 ) // X needs to have dll-interface to be used by clients of class Z
13 #endif
14 
16 
17 
18 class TestResult;
19 
20 
31 class CPPUNIT_API TestCase : public TestLeaf,
32  public TestFixture
33 {
34 public:
35 
36  TestCase( const std::string &name );
37 
38  TestCase();
39 
40  ~TestCase();
41 
42  virtual void run(TestResult *result);
43 
44  std::string getName() const;
45 
47  virtual void runTest();
48 
49 private:
50  TestCase( const TestCase &other );
51  TestCase &operator=( const TestCase &other );
52 
53 private:
54  const std::string m_name;
55 };
56 
58 
59 #if CPPUNIT_NEED_DLL_DECL
60 #pragma warning( pop )
61 #endif
62 
63 #endif // CPPUNIT_TESTCASE_H

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