testsetup.h

来自「著名的uncle Bob的Agile software development的」· C头文件 代码 · 共 37 行

H
37
字号

#ifndef CPP_UINT_TESTSETUP_H
#define CPP_UINT_TESTSETUP_H

#ifndef CPPUNIT_GUARDS_H
#include "Guards.h"
#endif

#ifndef CPPUNIT_TESTDECORATOR_H
#include "TestDecorator.h"
#endif

class Test;
class TestResult;


class TestSetup : public TestDecorator 
{
    REFERENCEOBJECT (TestSetup)

public:
                    TestSetup (Test *test) : TestDecorator (test) {}
                    run (TestResult *result);

protected:
    void            setUp () {}
    void            tearDown () {}

};


inline TestSetup::run (TestResult *result)
{ setUp (); TestDecorator::run (result); tearDown (); }

#endif

⌨️ 快捷键说明

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