My Project
Loading...
Searching...
No Matches
Descriptions.h
Go to the documentation of this file.
1#ifndef __cxxtest__Descriptions_h__
2#define __cxxtest__Descriptions_h__
3
4//
5// TestDescription, SuiteDescription and WorldDescription
6// hold information about tests so they can be run and reported.
7//
8
10
11namespace CxxTest
12{
13 class TestSuite;
14
15 class TestDescription : public Link
16 {
17 public:
18 virtual ~TestDescription();
19
20 virtual const char *file() const = 0;
21 virtual unsigned line() const = 0;
22 virtual const char *testName() const = 0;
23 virtual const char *suiteName() const = 0;
24
25 virtual void run() = 0;
26
27 virtual const TestDescription *next() const = 0;
28 virtual TestDescription *next() = 0;
29 };
30
31 class SuiteDescription : public Link
32 {
33 public:
34 virtual ~SuiteDescription();
35
36 virtual const char *file() const = 0;
37 virtual unsigned line() const = 0;
38 virtual const char *suiteName() const = 0;
39 virtual TestSuite *suite() const = 0;
40
41 virtual unsigned numTests() const = 0;
42 virtual const TestDescription &testDescription( unsigned /*i*/ ) const = 0;
43
44 virtual TestDescription *firstTest() = 0;
45 virtual const TestDescription *firstTest() const = 0;
46 virtual SuiteDescription *next() = 0;
47 virtual const SuiteDescription *next() const = 0;
48
49 virtual void activateAllTests() = 0;
50 virtual bool leaveOnly( const char * /*testName*/ ) = 0;
51 };
52
53 class WorldDescription : public Link
54 {
55 public:
56 virtual ~WorldDescription();
57
58 virtual unsigned numSuites( void ) const = 0;
59 virtual unsigned numTotalTests( void ) const = 0;
60 virtual const SuiteDescription &suiteDescription( unsigned /*i*/ ) const = 0;
61
63 char *strTotalTests( char * /*buffer*/ ) const;
64
66 virtual const SuiteDescription *firstSuite() const = 0;
67
68 virtual void activateAllTests() = 0;
69 virtual bool leaveOnly( const char * /*suiteName*/, const char * /*testName*/ = 0 ) = 0;
70 };
71}
72
73#endif // __cxxtest__Descriptions_h__
74
virtual unsigned numTests() const =0
virtual void activateAllTests()=0
virtual TestDescription * firstTest()=0
virtual const TestDescription * firstTest() const =0
virtual TestSuite * suite() const =0
virtual SuiteDescription * next()=0
virtual bool leaveOnly(const char *)=0
virtual const TestDescription & testDescription(unsigned) const =0
virtual const SuiteDescription * next() const =0
virtual const char * suiteName() const =0
virtual unsigned line() const =0
virtual const char * file() const =0
virtual const char * file() const =0
virtual const TestDescription * next() const =0
virtual void run()=0
virtual const char * suiteName() const =0
virtual TestDescription * next()=0
virtual const char * testName() const =0
virtual unsigned line() const =0
virtual unsigned numSuites(void) const =0
char * strTotalTests(char *) const
virtual SuiteDescription * firstSuite()=0
virtual unsigned numTotalTests(void) const =0
virtual bool leaveOnly(const char *, const char *=0)=0
virtual const SuiteDescription & suiteDescription(unsigned) const =0
virtual void activateAllTests()=0
virtual const SuiteDescription * firstSuite() const =0