source: git/libpolys/tests/cxxtest/DummyDescriptions.h @ 405407

spielwiese
Last change on this file since 405407 was 4aa8610, checked in by Mohamed Barakat <mohamed.barakat@…>, 13 years ago
created libpolys/tests and set up the beginning of a test-suite using cxxtest
  • Property mode set to 100644
File size: 2.0 KB
Line 
1#ifndef __cxxtest__DummyDescriptions_h__
2#define __cxxtest__DummyDescriptions_h__
3
4//
5// DummyTestDescription, DummySuiteDescription and DummyWorldDescription
6//
7
8#include <cxxtest/Descriptions.h>
9
10namespace CxxTest
11{
12    class DummyTestDescription : public TestDescription
13    {
14    public:
15        DummyTestDescription();
16       
17        const char *file() const;
18        unsigned line() const;
19        const char *testName() const;
20        const char *suiteName() const;
21        bool setUp();
22        void run();
23        bool tearDown();
24
25        TestDescription *next();
26        const TestDescription *next() const;
27    };
28
29    class DummySuiteDescription : public SuiteDescription
30    {     
31    public:
32        DummySuiteDescription();
33       
34        const char *file() const;
35        unsigned line() const;
36        const char *suiteName() const;
37        TestSuite *suite() const;
38        unsigned numTests() const;
39        const TestDescription &testDescription( unsigned ) const;
40        SuiteDescription *next();
41        TestDescription *firstTest();
42        const SuiteDescription *next() const;
43        const TestDescription *firstTest() const;
44        void activateAllTests();
45        bool leaveOnly( const char * /*testName*/ );
46       
47        bool setUp();
48        bool tearDown();
49
50    private:
51        DummyTestDescription _test;
52    };
53
54    class DummyWorldDescription : public WorldDescription
55    {
56    public:
57        DummyWorldDescription();
58       
59        unsigned numSuites( void ) const;
60        unsigned numTotalTests( void ) const;
61        const SuiteDescription &suiteDescription( unsigned ) const;
62        SuiteDescription *firstSuite();
63        const SuiteDescription *firstSuite() const;
64        void activateAllTests();
65        bool leaveOnly( const char * /*suiteName*/, const char * /*testName*/ = 0 );
66           
67        bool setUp();
68        bool tearDown();
69
70    private:
71        DummySuiteDescription _suite;
72    };
73}
74
75#endif // __cxxtest__DummyDescriptions_h__
76
Note: See TracBrowser for help on using the repository browser.