I am new to CppUnit (haven't used equivalents e.g. JUnit either). I've been evaluating it using a simple stack class, and am getting some test failures, woohoo! :D
I have created a TestFixture like this:
class StackTest : public TestFixture
{
//...
CPPUNIT_TEST(testConstructor);
// ...
};
There are several tests, and one of them is creating a seg fault (joy!)
What I want to do is to be able to see the name of each test as it is run so that I can easily identify which test segfaults without having to count the dots...
Is it possible to do this? Here is the code that runs the testing:
I am new to CppUnit (haven't used equivalents e.g. JUnit either). I've been evaluating it using a simple stack class, and am getting some test failures, woohoo! :D
I have created a TestFixture like this:
class StackTest : public TestFixture
{
//...
CPPUNIT_TEST(testConstructor);
// ...
};
There are several tests, and one of them is creating a seg fault (joy!)
What I want to do is to be able to see the name of each test as it is run so that I can easily identify which test segfaults without having to count the dots...
Is it possible to do this? Here is the code that runs the testing:
CPPUNIT_TEST_SUITE_REGISTRATION(StackTest);
int main(void)
{
CppUnit::TextTestRunner runner;
CppUnit::TestFactoryRegistry& registry = CppUnit::TestFactoryRegistry::getRegistry();
runner.addTest(registry.makeTest());
bool success = runner.run("", false);
return success? 0 : 1;
}
Use BriefTestProgressListener for this. Look at DllPlugInTester to see how to use it.
Baptiste.