Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54462 - trunk/boost/test/impl
From: gennadiy.rozental_at_[hidden]
Date: 2009-06-28 05:39:36


Author: rogeeff
Date: 2009-06-28 05:39:36 EDT (Sun, 28 Jun 2009)
New Revision: 54462
URL: http://svn.boost.org/trac/boost/changeset/54462

Log:
attempt at fixing sun 5.8 build

Text files modified:
   trunk/boost/test/impl/unit_test_main.ipp | 5 +++--
   trunk/boost/test/impl/unit_test_parameters.ipp | 14 ++++++++++----
   2 files changed, 13 insertions(+), 6 deletions(-)

Modified: trunk/boost/test/impl/unit_test_main.ipp
==============================================================================
--- trunk/boost/test/impl/unit_test_main.ipp (original)
+++ trunk/boost/test/impl/unit_test_main.ipp 2009-06-28 05:39:36 EDT (Sun, 28 Jun 2009)
@@ -23,7 +23,8 @@
 
 #include <boost/test/detail/unit_test_parameters.hpp>
 
-#if !defined(__BORLANDC__) && !BOOST_WORKAROUND( BOOST_MSVC, < 1300 )
+#if !defined(__BORLANDC__) && !BOOST_WORKAROUND( BOOST_MSVC, < 1300 ) && !BOOST_WORKAROUND( __SUNPRO_CC, < 0x5100 )
+#define BOOST_TEST_SUPPORT_RUN_BY_NAME
 #include <boost/test/utils/iterator/token_iterator.hpp>
 #endif
 
@@ -100,7 +101,7 @@
         const_string m_value;
     };
     // Constructor
-#if defined(__BORLANDC__) || BOOST_WORKAROUND( BOOST_MSVC, < 1300 )
+#ifndef BOOST_TEST_SUPPORT_RUN_BY_NAME
     explicit test_case_filter( const_string ) : m_depth( 0 ) {}
 #else
     explicit test_case_filter( const_string tc_to_run )

Modified: trunk/boost/test/impl/unit_test_parameters.ipp
==============================================================================
--- trunk/boost/test/impl/unit_test_parameters.ipp (original)
+++ trunk/boost/test/impl/unit_test_parameters.ipp 2009-06-28 05:39:36 EDT (Sun, 28 Jun 2009)
@@ -215,16 +215,22 @@
             return s_cla_parser.get<T>( parameter_name );
 
         optional<T> val = s_cla_parser.get<optional<T> >( parameter_name );
- return val ? *val : optional_value;
+ if( val )
+ return *val;
+ else
+ return optional_value;
     }
 
     boost::optional<T> v;
 
- #ifndef UNDER_CE
+#ifndef UNDER_CE
     env::get( parameter_2_env_var[parameter_name], v );
- #endif
+#endif
 
- return v? *v : default_value;
+ if( v )
+ return *v;
+ else
+ return default_value;
 }
 
 //____________________________________________________________________________//


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk