Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75373 - trunk/boost/test/impl
From: gennadiy.rozental_at_[hidden]
Date: 2011-11-07 04:50:57


Author: rogeeff
Date: 2011-11-07 04:50:55 EST (Mon, 07 Nov 2011)
New Revision: 75373
URL: http://svn.boost.org/trac/boost/changeset/75373

Log:
eliminated warning in framework.ipp\nBetter type name for gcc builds
Text files modified:
   trunk/boost/test/impl/execution_monitor.ipp | 27 ++++++++++++++++++++++++++-
   trunk/boost/test/impl/framework.ipp | 5 +----
   2 files changed, 27 insertions(+), 5 deletions(-)

Modified: trunk/boost/test/impl/execution_monitor.ipp
==============================================================================
--- trunk/boost/test/impl/execution_monitor.ipp (original)
+++ trunk/boost/test/impl/execution_monitor.ipp 2011-11-07 04:50:55 EST (Mon, 07 Nov 2011)
@@ -158,6 +158,7 @@
 # define BOOST_TEST_ALT_STACK_SIZE SIGSTKSZ
 # endif
 
+
 #else
 
 # define BOOST_NO_SIGNAL_HANDLING
@@ -168,6 +169,10 @@
 #include <errno.h>
 #endif
 
+#if defined(__GNUC__) && !defined(BOOST_NO_TYPEID)
+# include <cxxabi.h>
+#endif
+
 #include <boost/test/detail/suppress_warnings.hpp>
 
 //____________________________________________________________________________//
@@ -274,6 +279,26 @@
     unsigned m_previosly_enabled;
 };
 
+#ifndef BOOST_NO_TYPEID
+
+// ************************************************************************** //
+// ************** typeid_name ************** //
+// ************************************************************************** //
+
+template<typename T>
+char const*
+typeid_name( T const& t )
+{
+#ifdef __GNUC__
+ int status;
+
+ return abi::__cxa_demangle( typeid(t).name(), 0, 0, &status );
+#else
+ return typeid(t).name();
+#endif
+}
+#endif
+
 } // namespace detail
 
 #if defined(BOOST_SIGACTION_BASED_SIGNAL_HANDLING)
@@ -1183,7 +1208,7 @@
     catch( ex_name const& ex ) \
         { detail::report_error( execution_exception::cpp_exception_error, \
                           current_exception_cast<boost::exception const>(), \
- "%s: %s", typeid(ex).name(), ex.what() ); } \
+ "%s: %s", detail::typeid_name(ex), ex.what() ); } \
 /**/
 #endif
 

Modified: trunk/boost/test/impl/framework.ipp
==============================================================================
--- trunk/boost/test/impl/framework.ipp (original)
+++ trunk/boost/test/impl/framework.ipp 2011-11-07 04:50:55 EST (Mon, 07 Nov 2011)
@@ -510,13 +510,12 @@
         ut_detail::tu_enable_list tu_to_enable;
         ut_detail::tu_enable_list tu_to_disable;
         bool had_enable_filter = false;
- bool had_disable_filter = false;
 
         BOOST_TEST_FOREACH( const_string, filter, runtime_config::test_to_run() ) {
             BOOST_TEST_SETUP_ASSERT( !filter.is_empty(), "Invalid filter specification" );
 
             bool enable_or_disable = true;
-
+
             // 11. Decide if this "enabler" or "disabler" filter
             if( filter[0] == '!' ) {
                 enable_or_disable = false;
@@ -526,8 +525,6 @@
 
             if( enable_or_disable )
                 had_enable_filter = true;
- else
- had_disable_filter = true;
 
             // 12. Choose between name filter and label filter
             if( filter[0] == '@' ) {


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