mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-08 11:02:17 +01:00
56 lines
678 B
C++
56 lines
678 B
C++
//
|
|
// TestSetup.h
|
|
//
|
|
|
|
|
|
#ifndef Poco_CppUnit_TestSetup_INCLUDED
|
|
#define Poco_CppUnit_TestSetup_INCLUDED
|
|
|
|
|
|
#include "Poco/CppUnit/CppUnit.h"
|
|
#include "Poco/CppUnit/Guards.h"
|
|
#include "Poco/CppUnit/TestDecorator.h"
|
|
|
|
|
|
namespace CppUnit {
|
|
|
|
|
|
class Test;
|
|
class TestResult;
|
|
|
|
|
|
class CppUnit_API TestSetup: public TestDecorator
|
|
{
|
|
REFERENCEOBJECT (TestSetup)
|
|
|
|
public:
|
|
TestSetup(Test* test): TestDecorator(test)
|
|
{
|
|
}
|
|
|
|
void run(TestResult* result);
|
|
|
|
protected:
|
|
void setUp()
|
|
{
|
|
}
|
|
|
|
void tearDown()
|
|
{
|
|
}
|
|
};
|
|
|
|
|
|
inline void TestSetup::run(TestResult* result)
|
|
{
|
|
setUp();
|
|
TestDecorator::run(result);
|
|
tearDown();
|
|
}
|
|
|
|
|
|
} // namespace CppUnit
|
|
|
|
|
|
#endif // Poco_CppUnit_TestSetup_INCLUDED
|