~ubuntu-branches/ubuntu/oneiric/psi/oneiric

« back to all changes in this revision

Viewing changes to third-party/cppunit/cppunit/include/cppunit/TestCase.h

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2009-09-25 17:49:51 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925174951-lvm7kdap82o8xhn3
Tags: 0.13-1
* Updated to upstream version 0.13
* Set Standards-Version to 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
 
17
 
/*! \brief A single test object.
18
 
 *
19
 
 * This class is used to implement a simple test case: define a subclass
20
 
 * that overrides the runTest method.
21
 
 *
22
 
 * You don't usually need to use that class, but TestFixture and TestCaller instead.
23
 
 *
24
 
 * You are expected to subclass TestCase is you need to write a class similiar
25
 
 * to TestCaller.
26
 
 */
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
 
 
42
 
    //! FIXME: this should probably be pure virtual.
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