My organization is using CppUnit and I am trying to run the same test using different parameters. Running a loop inside the test is not a good option as any failure will abo
class members : public CppUnit::TestFixture
{
int i;
float f;
};
class some_values : public members
{
void setUp()
{
// initialization here
}
};
class different_values : public members
{
void setUp()
{
// different initialization here
}
};
tempalte
class my_test : public F
{
CPPUNIT_TEST_SUITE(my_test);
CPPUNIT_TEST(foo);
CPPUNIT_TEST_SUITE_END();
foo() {}
};
CPPUNIT_TEST_SUITE_REGISTRATION(my_test);
CPPUNIT_TEST_SUITE_REGISTRATION(my_test);
I don't know if that's considered kosher as per CppUnit's "preferred way of doing things" but that's the approach I'm taking now.