The new (Boost 1.30.0) BOOST_AUTO_UNIT_TEST macro appends the current file line
number to the generated function name. This can cause name collisions across
source files. My patch appends the function name. The function name has global
visibility, so it should be unique.



*** auto_unit_test.hpp.orig     Thu Feb 13 03:11:34 2003
--- auto_unit_test.hpp.new      Tue Mar 25 20:20:17 2003
***************
*** 52,58 ****
  #define BOOST_AUTO_UNIT_TEST( func_name )                           \
  static void func_name();                                            \
  static boost::unit_test_framework::auto_unit_test_registrar         \
!     BOOST_JOIN( test_registrar, __LINE__)                           \
          ( BOOST_TEST_CASE( func_name ) );                           \
  static void func_name()                                             \
  /**/
--- 52,58 ----
  #define BOOST_AUTO_UNIT_TEST( func_name )                           \
  static void func_name();                                            \
  static boost::unit_test_framework::auto_unit_test_registrar         \
!     BOOST_JOIN( test_registrar_, func_name)                         \
          ( BOOST_TEST_CASE( func_name ) );                           \
  static void func_name()                                             \
  /**/


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com

Attachment: auto_unit_test.hpp.patch
Description: auto_unit_test.hpp.patch

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to