Value:
static CppUnit::AutoRegisterSuite< ATestFixtureType > \ __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )(suiteName)
This macro declares a static variable whose construction causes a test suite factory to be inserted in the global registry suite of the specified name. The registry is available by calling the static function CppUnit::TestFactoryRegistry::getRegistry().
For the suite name, use a string returned by a static function rather than a hardcoded string. That way, you can know what are the name of named registry and you don't risk mistyping the registry name.
// MySuites.h namespace MySuites { std::string math() { return "Math"; } } // ComplexNumberTest.cpp #include "MySuites.h" CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ComplexNumberTest, MySuites::math() );
Value:
static CppUnit::AutoRegisterSuite< ATestFixtureType > \ __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )
This macro declares a static variable whose construction causes a test suite factory to be inserted in a global registry of such factories. The registry is available by calling the static function CppUnit::TestFactoryRegistry::getRegistry().