diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-04-15 14:33:11 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-04-15 14:33:11 +0000 |
| commit | 1b4bcf6f703248cb397587fe08635a1491d460ec (patch) | |
| tree | e0ae81d803807027d7b4a6f14d9c39da2321dd47 /include/cppunit/extensions | |
| parent | 5f5af41d52c01c8320baffea21cd60ebbb16380b (diff) | |
| download | cppunit-1b4bcf6f703248cb397587fe08635a1491d460ec.tar.gz | |
NEWS: updated.
NEWS: updated.
* configure.in: added include/cppunit/config/Makefile and
include/cppunit/plugin/Makefile to the list of target.
* doc/CppUnit-win.dox: enabled generation of HTML Help documentation.
* include/cppunit/config/Makefile.am:
* include/cppunit/plugin/Makefile.am: added.
* include/cppunit/config-bcb5.h:
* include/cppunit/config-msvc6.h:
* include/cppunit/config-mac.h: moved to include/cppunit/config/.
* include/cppunit/Portability.h: updated config files location. Added macros
CPPUNIT_STRINGIZE and CPPUNIT_JOIN (implementation adapted from boost.org).
Added macro CPPUNIT_MAKE_UNIQUE_NAME.
* include/cppunit/Test.h: modified methods order.
* include/cppunit/extensions/HelperMacros.h: renamed macro
__CPPUNIT_MAKE_UNIQUE_NAME to CPPUNIT_MAKE_UNIQUE_NAME and moved its
definition to include/cppunit/Portability.h.
* include/cppunit/extensions/TestDecorator.h: Inherits Test instead of TestLeaf.
* include/cppunit/plugin/DynamicLibraryManager.h:
* src/cppunit/DynamicLibraryManager.cpp: added. DLL manager (load & lookup
symbol).
* src/cppunit/BeOsDynamicLibraryManager.cpp:
* src/cppunit/UnixDynamicLibraryManager.cpp:
* src/cppunit/Win32DynamicLibraryManager.cpp: added. Implementation of
platform dependent methods of DynamicLibraryManager.
* include/cppunit/plugin/DynamicLibraryManagerException.h:
* src/cppunit/DynamicLibraryManagerException.cpp: added. Exception thrown
by DynamicLibraryManager.
* include/cppunit/plugin/TestPlugIn.h: added. CppUnitTestPlugIn interface
definition. Helper macros to implements plug-in.
* include/cppunit/plugin/TestPlugInSuite.h:
* src/cppunit/plugin/TestPlugInSuite.cpp: added. A suite to wrap a test
plug-in.
* include/cppunit/plugin/TestPlugInDefaultImpl.h:
* src/cppunit/TestPlugInDefaultImpl.cpp: added. A default implementation
of the test plug-in interface.
* src/msvc6/DllPlugInTester/DllPlugInTester.cpp: updated to use the
new TestPlugIn.
* examples/cppunittest/TestResultCollectorTest.cpp: fixed typo.
Diffstat (limited to 'include/cppunit/extensions')
| -rw-r--r-- | include/cppunit/extensions/HelperMacros.h | 14 | ||||
| -rw-r--r-- | include/cppunit/extensions/TestDecorator.h | 24 |
2 files changed, 25 insertions, 13 deletions
diff --git a/include/cppunit/extensions/HelperMacros.h b/include/cppunit/extensions/HelperMacros.h index 142cd1d..c7be1aa 100644 --- a/include/cppunit/extensions/HelperMacros.h +++ b/include/cppunit/extensions/HelperMacros.h @@ -259,16 +259,8 @@ namespace CppUnit /** @} */ -#define __CPPUNIT_CONCATENATE_DIRECT( s1, s2 ) s1##s2 -#define __CPPUNIT_CONCATENATE( s1, s2 ) __CPPUNIT_CONCATENATE_DIRECT( s1, s2 ) -/** Decorates the specified string with the line number to obtain a unique name; - * @param str String to decorate. - */ -#define __CPPUNIT_MAKE_UNIQUE_NAME( str ) __CPPUNIT_CONCATENATE( str, __LINE__ ) - - -/** Adds the specified fixture suite to the unnamed registry. +/*! Adds the specified fixture suite to the unnamed registry. * \ingroup CreatingTestSuite * * This macro declares a static variable whose construction @@ -285,7 +277,7 @@ namespace CppUnit */ #define CPPUNIT_TEST_SUITE_REGISTRATION( ATestFixtureType ) \ static CppUnit::AutoRegisterSuite< ATestFixtureType > \ - __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite ) + CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite ) /** Adds the specified fixture suite to the specified registry suite. @@ -325,7 +317,7 @@ namespace CppUnit */ #define CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( ATestFixtureType, suiteName ) \ static CppUnit::AutoRegisterSuite< ATestFixtureType > \ - __CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )(suiteName) + CPPUNIT_MAKE_UNIQUE_NAME(__autoRegisterSuite )(suiteName) // Backwards compatibility diff --git a/include/cppunit/extensions/TestDecorator.h b/include/cppunit/extensions/TestDecorator.h index 9777540..bceca07 100644 --- a/include/cppunit/extensions/TestDecorator.h +++ b/include/cppunit/extensions/TestDecorator.h @@ -2,7 +2,7 @@ #define CPPUNIT_EXTENSIONS_TESTDECORATOR_H #include <cppunit/Portability.h> -#include <cppunit/TestLeaf.h> +#include <cppunit/Test.h> namespace CppUnit { @@ -17,17 +17,23 @@ class TestResult; * * Does not assume ownership of the test it decorates */ -class CPPUNIT_API TestDecorator : public TestLeaf +class CPPUNIT_API TestDecorator : public Test { public: TestDecorator( Test *test ); ~TestDecorator(); int countTestCases() const; + std::string getName() const; + void run( TestResult *result ); + int getChildTestCount() const; + protected: + Test *doGetChildTestAt( int index ) const; + Test *m_test; private: @@ -69,6 +75,20 @@ TestDecorator::getName() const return m_test->getName(); } + +inline int +TestDecorator::getChildTestCount() const +{ + return m_test->getChildTestCount(); +} + + +inline Test * +TestDecorator::doGetChildTestAt( int index ) const +{ + return m_test->getChildTestAt( index ); +} + } // namespace CppUnit #endif |
