CppUnit project page | FAQ | CppUnit home page |
Compounds | |
class | CppUnit::TestFactoryRegistry |
Registry for TestFactory. More... | |
class | CppUnit::TestSuite |
A Composite of Tests. More... | |
Defines | |
#define | CPPUNIT_TEST_SUITE_REGISTRATION(ATestFixtureType) |
Adds the specified fixture suite to the unnamed registry. More... | |
#define | CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(ATestFixtureType, suiteName) |
Adds the specified fixture suite to the specified registry suite. More... |
|
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().
|
hosts this site. |
Send comments to: CppUnit Developers |