[Cppunit-cvs] cppunit2/include/cpput config.h,1.9,1.10 registry.h,1.3,1.4
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2005-03-03 20:57:42
|
Update of /cvsroot/cppunit/cppunit2/include/cpput In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12359/include/cpput Modified Files: config.h registry.h Log Message: * renamed and moved macro CPPUT_MAKE_UNIQUE_NAME to cpptl library. Index: config.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/config.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** config.h 26 Feb 2005 13:44:38 -0000 1.9 --- config.h 3 Mar 2005 20:57:14 -0000 1.10 *************** *** 106,148 **** - - - // Macro tools... - /////////////////////////////////////////////////////////////////////////// - - - /*! Joins to symbol after expanding them into string. - * - * Use this macro to join two symbols. Example of usage: - * - * \code - * #define MAKE_UNIQUE_NAME(prefix) CPPUT_JOIN( prefix, __LINE__ ) - * \endcode - * - * The macro defined in the example concatenate a given prefix with the line number - * to obtain a 'unique' identifier. - * - * \internal From boost documentation: - * The following piece of macro magic joins the two - * arguments together, even when one of the arguments is - * itself a macro (see 16.3.1 in C++ standard). The key - * is that macro expansion of macro arguments does not - * occur in CPPUT_JOIN2 but does in CPPUT_JOIN. - */ - #define CPPUT_JOIN( symbol1, symbol2 ) _CPPUT_DO_JOIN( symbol1, symbol2 ) - - /// \internal - #define _CPPUT_DO_JOIN( symbol1, symbol2 ) _CPPUT_DO_JOIN2( symbol1, symbol2 ) - - /// \internal - #define _CPPUT_DO_JOIN2( symbol1, symbol2 ) symbol1##symbol2 - - /*! Adds the line number to the specified string to create a unique identifier. - * \param prefix Prefix added to the line number to create a unique identifier. - * \see CPPUT_TEST_SUITE_REGISTRATION for an example of usage. - */ - #define CPPUT_MAKE_UNIQUE_NAME( prefix ) CPPUT_JOIN( prefix, __LINE__ ) - - namespace CppUT { --- 106,109 ---- Index: registry.h =================================================================== RCS file: /cvsroot/cppunit/cppunit2/include/cpput/registry.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** registry.h 27 Feb 2005 14:38:26 -0000 1.3 --- registry.h 3 Mar 2005 20:57:14 -0000 1.4 *************** *** 118,132 **** #define CPPUT_REGISTER_NAMED_SUITE_TO_DEFAULT( TestFixtureType, suiteName ) \ static CppUT::SuiteRegisterer< TestFixtureType > \ ! CPPUT_MAKE_UNIQUE_NAME(cpputSuiteRegisterer )(suiteName) #define CPPUT_REGISTER_SUITE_TO_DEFAULT( TestFixtureType ) \ static CppUT::SuiteRegisterer< TestFixtureType > \ ! CPPUT_MAKE_UNIQUE_NAME(cpputSuiteRegisterer )(#TestFixtureType) #define CPPUT_REGISTER_SUITE_IN( TestFixtureType, parentSuiteName ) \ static CppUT::SuiteRegisterer< TestFixtureType > \ ! CPPUT_MAKE_UNIQUE_NAME(cpputSuiteRegisterer )(parentSuiteName,\ Impl::RegisterToNamedSuiteTag() ) --- 118,132 ---- #define CPPUT_REGISTER_NAMED_SUITE_TO_DEFAULT( TestFixtureType, suiteName ) \ static CppUT::SuiteRegisterer< TestFixtureType > \ ! CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRegisterer )(suiteName) #define CPPUT_REGISTER_SUITE_TO_DEFAULT( TestFixtureType ) \ static CppUT::SuiteRegisterer< TestFixtureType > \ ! CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRegisterer )(#TestFixtureType) #define CPPUT_REGISTER_SUITE_IN( TestFixtureType, parentSuiteName ) \ static CppUT::SuiteRegisterer< TestFixtureType > \ ! CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRegisterer )(parentSuiteName,\ Impl::RegisterToNamedSuiteTag() ) *************** *** 136,140 **** suiteName ) \ static CppUT::SuiteRegisterer< TestFixtureType > \ ! CPPUT_MAKE_UNIQUE_NAME(cpputSuiteRegisterer )(parentSuiteName,\ suiteName, \ Impl::RegisterToNamedSuiteTag() ) --- 136,140 ---- suiteName ) \ static CppUT::SuiteRegisterer< TestFixtureType > \ ! CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRegisterer )(parentSuiteName,\ suiteName, \ Impl::RegisterToNamedSuiteTag() ) *************** *** 164,168 **** #define CPPUT_REGISTER_SUITE_RELATIONSHIP( parentSuiteName, childSuiteName ) \ static CppUT::SuiteRelationshipRegisterer \ ! CPPUT_MAKE_UNIQUE_NAME(cpputSuiteRelationShipRegisterer )( \ parentSuiteName, \ childSuiteName ) --- 164,168 ---- #define CPPUT_REGISTER_SUITE_RELATIONSHIP( parentSuiteName, childSuiteName ) \ static CppUT::SuiteRelationshipRegisterer \ ! CPPTL_MAKE_UNIQUE_NAME(cpputSuiteRelationShipRegisterer )( \ parentSuiteName, \ childSuiteName ) |