descriptions.h

来自「symbian 3rd下的单元测试工具 里面包括一个框架 一个实例程序 还有使用」· C头文件 代码 · 共 50 行

H
50 行
字号
#ifndef __CXXTEST__DESCRIPTION_H
#define __CXXTEST__DESCRIPTION_H

//
// TestDescription, SuiteDescription and WorldDescription
// hold information about tests so they can be run and reported.
//

namespace CxxTest 
{
    class Runnable;
    class TestListener;
    class TestSuite;
    class TestRunner;

    struct TestDescription
    {
	const char *file;
	unsigned line;
	const char *suite;
	const char *name;
	Runnable *test;
	int mode; 
    };

    struct SuiteDescription
    {
	const char *name;
	TestSuite *suite;
	unsigned numTests;
	const TestDescription *tests;
    };

    class WorldDescription
    {
    public:
	virtual signed int numSuites( void ) const = 0;
	virtual unsigned numTotalTests( void ) const = 0;
	virtual const SuiteDescription &suiteDescription( unsigned i ) const = 0;
	
    protected:
	friend class TestRunner;
	virtual void setUp( TestListener *l ) const = 0;
	virtual void tearDown( TestListener *l ) const = 0;
    };
}

#endif // __CXXTEST__DESCRIPTION_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?