diff options
| author | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-07-12 04:59:58 +0000 |
|---|---|---|
| committer | Baptiste Lepilleur <gaiacrtn@free.fr> | 2002-07-12 04:59:58 +0000 |
| commit | 10c39014e897d43e118e2ddd4f2c90b7de7ec517 (patch) | |
| tree | b27b56c7e70c4cd464b18be73aa7f4e416676b2e /include/cppunit/plugin | |
| parent | 6943d47a76445bbfebc99859ed38698760354642 (diff) | |
| download | cppunit-10c39014e897d43e118e2ddd4f2c90b7de7ec517.tar.gz | |
Include/cppunit/config/Portability.
include/cppunit/config/Portability.h: If the compiler does not support
namespace (CPPUNIT_HAVE_NAMESPACES=0), define CPPUNIT_NO_STD_NAMESPACE
and CPPUNIT_NO_NAMESPACE. If CPPUNIT_NO_STD_NAMESPACE is defined, then
CppUnit assumes that STL are in the global namespace. If
CPPUNIT_NO_NAMESPACE is defined, then CppUnit classes are placed in the
global namespace instead of the CppUnit namespace.
* include/cppunit/config/config-bcb5.h:
* include/cppunit/config/config-msvc6.h: added definition of macro
CPPUNIT_HAVE_NAMESPACES.
* include/cppunit/tools/StringTools.h: use CPPUNIT_WRAP_COLUMN as default
parameter value for wrap().
* include/cppunit/*/*.h:
* src/cppunit/*.cpp: changed all CppUnit namespace declaration to use
macros CPPUNIT_NS_BEGIN and CPPUNIT_NS_END. Also, changed reference
to CppUnit namespace (essentially in macros) using CPPUNIT_NS macro.
Diffstat (limited to 'include/cppunit/plugin')
| -rw-r--r-- | include/cppunit/plugin/DynamicLibraryManager.h | 6 | ||||
| -rw-r--r-- | include/cppunit/plugin/DynamicLibraryManagerException.h | 7 | ||||
| -rw-r--r-- | include/cppunit/plugin/Parameters.h | 6 | ||||
| -rw-r--r-- | include/cppunit/plugin/PlugInManager.h | 7 | ||||
| -rw-r--r-- | include/cppunit/plugin/TestPlugIn.h | 19 | ||||
| -rw-r--r-- | include/cppunit/plugin/TestPlugInDefaultImpl.h | 6 |
6 files changed, 24 insertions, 27 deletions
diff --git a/include/cppunit/plugin/DynamicLibraryManager.h b/include/cppunit/plugin/DynamicLibraryManager.h index 3b4f30b..afb0b4a 100644 --- a/include/cppunit/plugin/DynamicLibraryManager.h +++ b/include/cppunit/plugin/DynamicLibraryManager.h @@ -5,8 +5,7 @@ #if !defined(CPPUNIT_NO_TESTPLUGIN) -namespace CppUnit -{ +CPPUNIT_NS_BEGIN /*! \brief Manages dynamic libraries. @@ -114,8 +113,7 @@ private: }; -} // namespace CppUnit - +CPPUNIT_NS_END #endif // !defined(CPPUNIT_NO_TESTPLUGIN) diff --git a/include/cppunit/plugin/DynamicLibraryManagerException.h b/include/cppunit/plugin/DynamicLibraryManagerException.h index e0a1283..42e180f 100644 --- a/include/cppunit/plugin/DynamicLibraryManagerException.h +++ b/include/cppunit/plugin/DynamicLibraryManagerException.h @@ -8,8 +8,8 @@ #include <string> -namespace CppUnit -{ +CPPUNIT_NS_BEGIN + /*! \brief Exception thrown by DynamicLibraryManager when a failure occurs. * @@ -42,8 +42,7 @@ private: }; -} // namespace CppUnit - +CPPUNIT_NS_END #endif // !defined(CPPUNIT_NO_TESTPLUGIN) diff --git a/include/cppunit/plugin/Parameters.h b/include/cppunit/plugin/Parameters.h index 8175235..54a26d2 100644 --- a/include/cppunit/plugin/Parameters.h +++ b/include/cppunit/plugin/Parameters.h @@ -8,13 +8,13 @@ #include <deque> #include <string> -namespace CppUnit -{ +CPPUNIT_NS_BEGIN + typedef std::deque<std::string> Parameters; -} // namespace CppUnit +CPPUNIT_NS_END #endif // !defined(CPPUNIT_NO_TESTPLUGIN) diff --git a/include/cppunit/plugin/PlugInManager.h b/include/cppunit/plugin/PlugInManager.h index f349ab1..87455f0 100644 --- a/include/cppunit/plugin/PlugInManager.h +++ b/include/cppunit/plugin/PlugInManager.h @@ -13,8 +13,8 @@ #include <cppunit/plugin/Parameters.h> struct CppUnitTestPlugIn; -namespace CppUnit -{ +CPPUNIT_NS_BEGIN + class DynamicLibraryManager; class TestResult; @@ -99,8 +99,7 @@ private: }; -} // namespace CppUnit - +CPPUNIT_NS_END #if CPPUNIT_NEED_DLL_DECL #pragma warning( pop ) diff --git a/include/cppunit/plugin/TestPlugIn.h b/include/cppunit/plugin/TestPlugIn.h index b77d50b..568293e 100644 --- a/include/cppunit/plugin/TestPlugIn.h +++ b/include/cppunit/plugin/TestPlugIn.h @@ -7,8 +7,9 @@ #include <cppunit/plugin/Parameters.h> -namespace CppUnit -{ +CPPUNIT_NS_BEGIN + + class Test; class TestFactoryRegistry; class TestResult; @@ -53,8 +54,8 @@ struct CppUnitTestPlugIn * N.B.: Parameters interface is not define yet, and the plug-in runner does * not yet support plug-in parameter. */ - virtual void initialize( CppUnit::TestFactoryRegistry *registry, - const CppUnit::Parameters ¶meters ) =0; + virtual void initialize( CPPUNIT_NS(TestFactoryRegistry) *registry, + const CPPUNIT_NS(Parameters) ¶meters ) =0; /*! Gives a chance to the plug-in to register TestListener. * @@ -63,17 +64,17 @@ struct CppUnitTestPlugIn * setUp some global resource: listen to TestListener::startTestRun(), * and TestListener::endTestRun(). */ - virtual void addListener( CppUnit::TestResult *eventManager ) =0; + virtual void addListener( CPPUNIT_NS(TestResult) *eventManager ) =0; /*! Gives a chance to the plug-in to remove its registered TestListener. * * Override this method to remove a TestListener that has been added. */ - virtual void removeListener( CppUnit::TestResult *eventManager ) =0; + virtual void removeListener( CPPUNIT_NS(TestResult) *eventManager ) =0; /*! Provides a way for the plug-in to register some XmlOutputterHook. */ - virtual void addXmlOutputterHooks( CppUnit::XmlOutputter *outputter ) =0; + virtual void addXmlOutputterHooks( CPPUNIT_NS(XmlOutputter) *outputter ) =0; /*! Called when the XmlOutputter is destroyed. * @@ -89,7 +90,7 @@ struct CppUnitTestPlugIn * reference on test that are no longer available if they are not * unregistered. */ - virtual void uninitialize( CppUnit::TestFactoryRegistry *registry ) =0; + virtual void uninitialize( CPPUNIT_NS(TestFactoryRegistry) *registry ) =0; }; @@ -185,7 +186,7 @@ typedef CppUnitTestPlugIn *(*TestPlugInSignature)(); * \see CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL(), CPPUNIT_PLUGIN_IMPLEMENT_MAIN(). */ #define CPPUNIT_PLUGIN_IMPLEMENT() \ - CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CppUnit::TestPlugInDefaultImpl ); \ + CPPUNIT_PLUGIN_EXPORTED_FUNCTION_IMPL( CPPUNIT_NS(TestPlugInDefaultImpl) ); \ CPPUNIT_PLUGIN_IMPLEMENT_MAIN() diff --git a/include/cppunit/plugin/TestPlugInDefaultImpl.h b/include/cppunit/plugin/TestPlugInDefaultImpl.h index 90d4398..a6cc09e 100644 --- a/include/cppunit/plugin/TestPlugInDefaultImpl.h +++ b/include/cppunit/plugin/TestPlugInDefaultImpl.h @@ -7,8 +7,8 @@ #include <cppunit/plugin/TestPlugIn.h> -namespace CppUnit -{ +CPPUNIT_NS_BEGIN + class TestSuite; @@ -45,7 +45,7 @@ public: }; -} // namespace CppUnit +CPPUNIT_NS_END #endif // !defined(CPPUNIT_NO_TESTPLUGIN) |
