poco/CppUnit/include/Poco/CppUnit/TestSetup.h

56 lines
678 B
C
Raw Normal View History

2012-04-29 20:52:25 +02:00
//
// TestSetup.h
//
#ifndef Poco_CppUnit_TestSetup_INCLUDED
#define Poco_CppUnit_TestSetup_INCLUDED
2012-04-29 20:52:25 +02:00
#include "Poco/CppUnit/CppUnit.h"
#include "Poco/CppUnit/Guards.h"
#include "Poco/CppUnit/TestDecorator.h"
2012-04-29 20:52:25 +02:00
namespace CppUnit {
class Test;
class TestResult;
class CppUnit_API TestSetup: public TestDecorator
2012-04-29 20:52:25 +02:00
{
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