#196 Qualified TestFixture names are not demangled

open
nobody
5
2009-03-16
2009-03-16
Martin Svensson
No

Background: I use cppunit 1.12.1 on a Linux/GCC platform. I like to put my testing classes in a namespace, such as:

-- MyTests.cpp:
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
namespace Testing
{
class MyTests : public CppUnit::TestFixture
{
public:
void setUp();
void tearDown();
void myTestcase();
protected:
CPPUNIT_TEST_SUITE(Testing::MyTests);
CPPUNIT_TEST(myTestcase);
CPPUNIT_TEST_SUITE_END();
};
}
--

-- textmain.cpp:
int main(int argc, const char* argv[])
{
CppUnit::TextTestRunner runner;
runner.addTest(Testing::MyTests::suite());
CppUnit::BriefTestProgressListener listener;
runner.eventManager().addListener(&listener);
bool result = runner.run(argc > 1 ? argv[1] : "",
false, // doWait
true, // doPrintResult
true); // doPrintProgress
return result ? 0 : 1;
}
--

Problem: The name of the testing class is not properly demangled. For example:
"N7Testing7MyTestsE::myTestcase. : OK"
^^ ^ ^

Discussion