Loading...
Searching...
No Matches
Descriptions.h
Go to the documentation of this file.
#ifndef __cxxtest__Descriptions_h__
#define __cxxtest__Descriptions_h__
//
// TestDescription, SuiteDescription and WorldDescription
// hold information about tests so they can be run and reported.
//
#include <cxxtest/LinkedList.h>
namespace CxxTest
{
class TestSuite;
class TestDescription : public Link
{
public:
virtual ~TestDescription();
virtual const char *file() const = 0;
virtual unsigned line() const = 0;
virtual const char *testName() const = 0;
virtual const char *suiteName() const = 0;
virtual void run() = 0;
virtual const TestDescription *next() const = 0;
virtual TestDescription *next() = 0;
};
class SuiteDescription : public Link
{
public:
virtual ~SuiteDescription();
virtual const char *file() const = 0;
virtual unsigned line() const = 0;
virtual const char *suiteName() const = 0;
virtual TestSuite *suite() const = 0;
virtual unsigned numTests() const = 0;
virtual const TestDescription &testDescription( unsigned /*i*/ ) const = 0;
virtual TestDescription *firstTest() = 0;
virtual const TestDescription *firstTest() const = 0;
virtual SuiteDescription *next() = 0;
virtual const SuiteDescription *next() const = 0;
virtual void activateAllTests() = 0;
virtual bool leaveOnly( const char * /*testName*/ ) = 0;
};
class WorldDescription : public Link
{
public:
virtual ~WorldDescription();
virtual unsigned numSuites( void ) const = 0;
virtual unsigned numTotalTests( void ) const = 0;
virtual const SuiteDescription &suiteDescription( unsigned /*i*/ ) const = 0;
enum { MAX_STRLEN_TOTAL_TESTS = 32 };
char *strTotalTests( char * /*buffer*/ ) const;
virtual SuiteDescription *firstSuite() = 0;
virtual const SuiteDescription *firstSuite() const = 0;
virtual void activateAllTests() = 0;
virtual bool leaveOnly( const char * /*suiteName*/, const char * /*testName*/ = 0 ) = 0;
};
}
#endif // __cxxtest__Descriptions_h__
LinkedList.h
CxxTest::Link::Link
Link()
Definition LinkedList.cpp:82
CxxTest::SuiteDescription
Definition Descriptions.h:32
CxxTest::SuiteDescription::~SuiteDescription
virtual ~SuiteDescription()
Definition Descriptions.cpp:9
CxxTest::SuiteDescription::numTests
virtual unsigned numTests() const =0
CxxTest::SuiteDescription::activateAllTests
virtual void activateAllTests()=0
CxxTest::SuiteDescription::firstTest
virtual TestDescription * firstTest()=0
CxxTest::SuiteDescription::firstTest
virtual const TestDescription * firstTest() const =0
CxxTest::SuiteDescription::suite
virtual TestSuite * suite() const =0
CxxTest::SuiteDescription::next
virtual SuiteDescription * next()=0
CxxTest::SuiteDescription::leaveOnly
virtual bool leaveOnly(const char *)=0
CxxTest::SuiteDescription::testDescription
virtual const TestDescription & testDescription(unsigned) const =0
CxxTest::SuiteDescription::next
virtual const SuiteDescription * next() const =0
CxxTest::SuiteDescription::suiteName
virtual const char * suiteName() const =0
CxxTest::SuiteDescription::line
virtual unsigned line() const =0
CxxTest::SuiteDescription::file
virtual const char * file() const =0
CxxTest::TestDescription
Definition Descriptions.h:16
CxxTest::TestDescription::file
virtual const char * file() const =0
CxxTest::TestDescription::next
virtual const TestDescription * next() const =0
CxxTest::TestDescription::run
virtual void run()=0
CxxTest::TestDescription::suiteName
virtual const char * suiteName() const =0
CxxTest::TestDescription::~TestDescription
virtual ~TestDescription()
Definition Descriptions.cpp:8
CxxTest::TestDescription::next
virtual TestDescription * next()=0
CxxTest::TestDescription::testName
virtual const char * testName() const =0
CxxTest::TestDescription::line
virtual unsigned line() const =0
CxxTest::TestSuite
Definition TestSuite.h:22
CxxTest::WorldDescription
Definition Descriptions.h:54
CxxTest::WorldDescription::MAX_STRLEN_TOTAL_TESTS
@ MAX_STRLEN_TOTAL_TESTS
Definition Descriptions.h:62
CxxTest::WorldDescription::numSuites
virtual unsigned numSuites(void) const =0
CxxTest::WorldDescription::strTotalTests
char * strTotalTests(char *) const
Definition Descriptions.cpp:16
CxxTest::WorldDescription::firstSuite
virtual SuiteDescription * firstSuite()=0
CxxTest::WorldDescription::numTotalTests
virtual unsigned numTotalTests(void) const =0
CxxTest::WorldDescription::leaveOnly
virtual bool leaveOnly(const char *, const char *=0)=0
CxxTest::WorldDescription::~WorldDescription
virtual ~WorldDescription()
Definition Descriptions.cpp:10
CxxTest::WorldDescription::suiteDescription
virtual const SuiteDescription & suiteDescription(unsigned) const =0
CxxTest::WorldDescription::activateAllTests
virtual void activateAllTests()=0
CxxTest::WorldDescription::firstSuite
virtual const SuiteDescription * firstSuite() const =0
CxxTest
Definition Descriptions.cpp:7