diff options
author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-04-17 21:27:28 +0000 |
---|---|---|
committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-04-17 21:27:28 +0000 |
commit | 87e5cf8f526380c40f63208c6c9e785f73d327b7 (patch) | |
tree | ba1871a917dfae7667b31587ced4072d5d18657d /include/cppunit/extensions/HelperMacros.h | |
parent | 6c1e9ed0f8fd7339084186df71b4dfc4c98a524e (diff) | |
download | cppunit-87e5cf8f526380c40f63208c6c9e785f73d327b7.tar.gz |
Bumped version to 1.
bumped version to 1.9.3
* FAQ: added question about 4786 warning on VC++.
* NEWS: updated.
* contrib/msvc/readme.txt: moved to contrib/readme.txt.
* contrib/xml-xsl/report.xsl: added XML style sheet contributed by
'cuppa' project team (http://sourceforge.jp/projects/cuppa/)
* examples/cppunittest/TestResultTest.h:
* examples/cppunittest/TestResultTest.cpp: added tests for
startTestRun()/endTestRun().
* examples/simple/*: added. A simple example.
* include/cppunit/BriefTestProgressListener.h:
* src/cppunit/BriefTestProgressListener.cpp: added. Verbose progess listener
that print the test name before running the test.
* include/cppunit/TestListener.h: added startTestRun()/endTestRun().
* include/cppunit/TestResult.h:
* src/cppunit/TestResult.cpp: added runTest(), to be called to run
a test by test runner.
* src/cppunit/TextTestRunner.cpp:
* src/cppunit/TestRunner.cpp: updated to use TestResult::runTest().
* include/cppunit/plugin/PlugInManager.h:
* src/cppunit/PlugInManager.cpp: added. Managers for all loaded plug-ins.
* include/cppunit/plugin/TestPlugInDefaultImpl.h:
* src/cppunit/TestPlugInDefaultImpl.cpp: renamed TestPlugInAdapter. All
implementations are empty.
* include/cppunit/plugin/TestPlugInSuite.h: removed.
* src/cppunit/TestPlugInSuite.cpp: removed. Replaced by PlugInManager.
* include/cppunit/plugin/TestPlugIn.h: rewrote the plug-in interface to
provide more versatility. updated macros to match new interface.
* include/cppunit/extensions/TestFactoryRegistry.h:
* include/cppunit/extensions/TestFactoryRegistry.cpp: Added unregisterFactory().
Added convenience method addRegistry(). Rewrote registry life cycle
management. AutoRegisterSuite can now detect that the registry has been
destroy and not call to it to unregister its test factory.
* include/cppunit/extensions/AutoRegisterTest.h: on destruction, the registered
factory is unregistered from the registry.
* include/cppunit/extensions/HelperMacros.h: added macros
CPPUNIT_REGISTRY_ADD_TO_DEFAULT and CPPUNIT_REGISTRY_ADD to help
build test suite hierarchy.
* src/cppunit/msvc/DllPlugInTester/*: moved to src/cppunit/DllPlugInTester/.
* src/cppunit/DllPlugInTester/DllPlugInTester.cpp: removed UNICODE stuffs. Use
the PlugInManager instead of PlugInTestSuite. Simplified: only one test on
command line, but many DLL can be specified. Added configurations to link
against cppunit dll, those are now the default configuration (static linking
don't make much sense for plug-in).
Diffstat (limited to 'include/cppunit/extensions/HelperMacros.h')
-rw-r--r-- | include/cppunit/extensions/HelperMacros.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/include/cppunit/extensions/HelperMacros.h b/include/cppunit/extensions/HelperMacros.h index c7be1aa..e8dfbef 100644 --- a/include/cppunit/extensions/HelperMacros.h +++ b/include/cppunit/extensions/HelperMacros.h @@ -272,6 +272,8 @@ namespace CppUnit * \warning This macro should be used only once per line of code (the line * number is used to name a hidden static variable). * \see CPPUNIT_TEST_SUITE_NAMED_REGISTRATION + * \see CPPUNIT_REGISTRY_ADD_TO_DEFAULT + * \see CPPUNIT_REGISTRY_ADD * \see CPPUNIT_TEST_SUITE, CppUnit::AutoRegisterSuite, * CppUnit::TestFactoryRegistry. */ @@ -312,6 +314,8 @@ namespace CppUnit * \warning This macro should be used only once per line of code (the line * number is used to name a hidden static variable). * \see CPPUNIT_TEST_SUITE_REGISTRATION + * \see CPPUNIT_REGISTRY_ADD_TO_DEFAULT + * \see CPPUNIT_REGISTRY_ADD * \see CPPUNIT_TEST_SUITE, CppUnit::AutoRegisterSuite, * CppUnit::TestFactoryRegistry.. */ @@ -319,6 +323,49 @@ namespace CppUnit static CppUnit::AutoRegisterSuite< ATestFixtureType > \ CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )(suiteName) +/*! Adds that the specified registry suite to another registry suite. + * \ingroup CreatingTestSuite + * + * Use this macros to automatically create test registry suite hierarchy. For example, + * if you want to create the following hierarchy: + * - Math + * - IntegerMath + * - FloatMath + * - FastFloat + * - StandardFloat + * + * You can do this automatically with: + * \code + * CPPUNIT_REGISTRY_ADD( "FastFloat", "FloatMath" ); + * CPPUNIT_REGISTRY_ADD( "IntegerMath", "Math" ); + * CPPUNIT_REGISTRY_ADD( "FloatMath", "Math" ); + * CPPUNIT_REGISTRY_ADD( "StandardFloat", "FloatMath" ); + * \endcode + * + * There is no specific order of declaration. Think of it as declaring links. + * + * You register the test in each suite using CPPUNIT_TEST_SUITE_NAMED_REGISTRATION. + * + * \param which Name of the registry suite to add to the registry suite named \a to. + * \param to Name of the registry suite \a which is added to. + * \see CPPUNIT_REGISTRY_ADD_TO_DEFAULT, CPPUNIT_TEST_SUITE_NAMED_REGISTRATION. + */ +#define CPPUNIT_REGISTRY_ADD( which, to ) \ + static CppUnit::AutoRegisterRegistry \ + CPPUNIT_MAKE_UNIQUE_NAME( __autoRegisterRegistry)( which, to ) + +/*! Adds that the specified registry suite to the default registry suite. + * \ingroup CreatingTestSuite + * + * This macro is just like CPPUNIT_REGISTRY_ADD except the specified registry + * suite is added to the default suite (root suite). + * + * \param which Name of the registry suite to add to the default registry suite. + * \see CPPUNIT_REGISTRY_ADD. + */ +#define CPPUNIT_REGISTRY_ADD_TO_DEFAULT( which ) \ + static CppUnit::AutoRegisterRegistry \ + CPPUNIT_MAKE_UNIQUE_NAME( __autoRegisterRegistry)( which ) // Backwards compatibility // (Not tested!) |