This example shows using a FixtureManager to setup any fixture required for a TestSuite.
#include <cstdio>
{
public:
MyTest1() :
{
}
void run() override
{
}
};
{
public:
MyTest2() :
{
}
void run() override
{
}
};
{
public:
{
}
bool setup(int argc, char** argv) override
{
printf("Myfixture setup!\n");
return true;
}
bool check() override
{
printf("Myfixture checking ...\n");
return true;
}
void tearDown() override
{
printf("Myfixture tear down!\n");
}
};
int main(int argc, char** argv)
{
MyFixture fixture(&suite);
MyTest1 test1;
MyTest2 test2;
}