Boost logo

Boost :

From: Convector Editor (creyes123_at_[hidden])
Date: 2003-03-25 20:45:29


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



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk