CppUnit project page | FAQ

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

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
11 CPPUNIT_NS_BEGIN
12
13
14 class TestResult;
15
16
27 class CPPUNIT_API TestCase : public TestLeaf,
28 public TestFixture
29 {
30 public:
31
32 TestCase( const std::string &name );
33
34 TestCase();
35
36 ~TestCase();
37
38 virtual void run(TestResult *result);
39
40 std::string getName() const;
41
43 virtual void runTest();
44
45 private:
46 TestCase( const TestCase &other );
47 TestCase &operator=( const TestCase &other );
48
49 private:
50 const std::string m_name;
51 };
52
53 CPPUNIT_NS_END
54
55 #endif // CPPUNIT_TESTCASE_H
TestFixture
Wraps a test case with setUp and tearDown methods.A TestFixture is used to provide a common environme...
Definition: TestFixture.h:83
TestResult
Manages TestListener.A single instance of this class is used when running the test. It is usually created by the test runner (TestRunner).
Definition: TestResult.h:51
Portability.h
TestCase::m_name
const std::string m_name
Definition: TestCase.h:50
TestAssert.h
Test::getName
virtual std::string getName() const =0
Returns the test name.
TestLeaf
A single test object.
Definition: TestLeaf.h:15
TestLeaf.h
CPPUNIT_NS_END
#define CPPUNIT_NS_END
Definition: Portability.h:120
CPPUNIT_NS_BEGIN
#define CPPUNIT_NS_BEGIN
Definition: Portability.h:119
Test::run
virtual void run(TestResult *result)=0
Run the test, collecting results.
TestCase
A single test object.
Definition: TestCase.h:27
TestFixture.h
CPPUNIT_API
#define CPPUNIT_API
Definition: CppUnitApi.h:27

| Send comments to: CppUnit Developers