|
Boost-Commit : |
From: gennadiy.rozental_at_[hidden]
Date: 2008-07-07 01:41:16
Author: rogeeff
Date: 2008-07-07 01:41:14 EDT (Mon, 07 Jul 2008)
New Revision: 47166
URL: http://svn.boost.org/trac/boost/changeset/47166
Log:
Some more warnings fixed. Fixes #1432
Fixes recent bug introduced in expectation testing modules
Text files modified:
trunk/boost/test/exception_safety.hpp | 2 +-
trunk/boost/test/impl/debug.ipp | 8 ++++----
trunk/boost/test/impl/exception_safety.ipp | 2 +-
trunk/boost/test/impl/framework.ipp | 2 +-
trunk/boost/test/impl/unit_test_main.ipp | 4 +++-
trunk/boost/test/logged_expectations.hpp | 2 +-
trunk/boost/test/test_tools.hpp | 9 ++++++++-
trunk/boost/test/utils/iterator/istream_line_iterator.hpp | 2 +-
8 files changed, 20 insertions(+), 11 deletions(-)
Modified: trunk/boost/test/exception_safety.hpp
==============================================================================
--- trunk/boost/test/exception_safety.hpp (original)
+++ trunk/boost/test/exception_safety.hpp 2008-07-07 01:41:14 EDT (Mon, 07 Jul 2008)
@@ -46,7 +46,7 @@
\
struct BOOST_AUTO_TC_UNIQUE_ID( test_name ) {}; \
\
-BOOST_AUTO_TC_REGISTRAR( test_name )( \
+BOOST_AUTO_TU_REGISTRAR( test_name )( \
boost::unit_test::make_test_case( \
&BOOST_AUTO_TC_INVOKER( test_name ), #test_name ), \
boost::unit_test::ut_detail::auto_tc_exp_fail< \
Modified: trunk/boost/test/impl/debug.ipp
==============================================================================
--- trunk/boost/test/impl/debug.ipp (original)
+++ trunk/boost/test/impl/debug.ipp 2008-07-07 01:41:14 EDT (Mon, 07 Jul 2008)
@@ -57,7 +57,7 @@
#include <boost/test/utils/algorithm.hpp>
// STL
-#include <cstring>
+#include <cstring> // std::memcpy
#include <map>
#include <cstdio>
#include <stdarg.h> // !! ?? cstdarg
@@ -497,7 +497,7 @@
//____________________________________________________________________________//
static void
-start_gdb_in_xemacs( dbg_startup_info const& dsi )
+start_gdb_in_xemacs( dbg_startup_info const& )
{
// !! ??
}
@@ -552,7 +552,7 @@
//____________________________________________________________________________//
static void
-start_dbx_in_emacs( dbg_startup_info const& dsi )
+start_dbx_in_emacs( dbg_startup_info const& /*dsi*/ )
{
// char dbg_cmd_buff[500]; // !! ??
//
@@ -564,7 +564,7 @@
//____________________________________________________________________________//
static void
-start_dbx_in_xemacs( dbg_startup_info const& dsi )
+start_dbx_in_xemacs( dbg_startup_info const& )
{
// !! ??
}
Modified: trunk/boost/test/impl/exception_safety.ipp
==============================================================================
--- trunk/boost/test/impl/exception_safety.ipp (original)
+++ trunk/boost/test/impl/exception_safety.ipp 2008-07-07 01:41:14 EDT (Mon, 07 Jul 2008)
@@ -401,7 +401,7 @@
namespace {
inline void
-format_location( wrap_stringstream& formatter, execution_path_point const& p, unsigned indent )
+format_location( wrap_stringstream& formatter, execution_path_point const& /*p*/, unsigned indent )
{
if( indent )
formatter << std::left << std::setw( indent ) << "";
Modified: trunk/boost/test/impl/framework.ipp
==============================================================================
--- trunk/boost/test/impl/framework.ipp (original)
+++ trunk/boost/test/impl/framework.ipp 2008-07-07 01:41:14 EDT (Mon, 07 Jul 2008)
@@ -190,7 +190,7 @@
struct priority_order {
bool operator()( test_observer* lhs, test_observer* rhs ) const
{
- return (lhs->priority() < rhs->priority()) || (lhs->priority() == rhs->priority()) && (lhs < rhs);
+ return (lhs->priority() < rhs->priority()) || ((lhs->priority() == rhs->priority()) && (lhs < rhs));
}
};
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 2008-07-07 01:41:14 EDT (Mon, 07 Jul 2008)
@@ -100,10 +100,10 @@
const_string m_value;
};
// Constructor
+#if !defined(__BORLANDC__) && BOOST_WORKAROUND( BOOST_MSVC, >= 1300 )
explicit test_case_filter( const_string tc_to_tun )
: m_depth( 0 )
{
-#if !defined(__BORLANDC__) && BOOST_WORKAROUND( BOOST_MSVC, >= 1300 )
string_token_iterator tit( tc_to_tun, (dropped_delimeters = "/", kept_delimeters = dt_none) );
while( tit != string_token_iterator() ) {
@@ -113,6 +113,8 @@
++tit;
}
+#else
+ explicit test_case_filter( const_string ) : m_depth( 0 ) {}
#endif
}
Modified: trunk/boost/test/logged_expectations.hpp
==============================================================================
--- trunk/boost/test/logged_expectations.hpp (original)
+++ trunk/boost/test/logged_expectations.hpp 2008-07-07 01:41:14 EDT (Mon, 07 Jul 2008)
@@ -43,7 +43,7 @@
\
struct BOOST_AUTO_TC_UNIQUE_ID( test_name ) {}; \
\
-BOOST_AUTO_TC_REGISTRAR( test_name )( \
+BOOST_AUTO_TU_REGISTRAR( test_name )( \
boost::unit_test::make_test_case( \
&BOOST_AUTO_TC_INVOKER( test_name ), #test_name ), \
boost::unit_test::ut_detail::auto_tc_exp_fail< \
Modified: trunk/boost/test/test_tools.hpp
==============================================================================
--- trunk/boost/test/test_tools.hpp (original)
+++ trunk/boost/test/test_tools.hpp 2008-07-07 01:41:14 EDT (Mon, 07 Jul 2008)
@@ -47,6 +47,10 @@
#include <ios> // for std::boolalpha
#include <climits> // for CHAR_BIT
+#ifdef BOOST_MSVC
+# pragma warning(disable: 4127) // conditional expression is constant
+#endif
+
#include <boost/test/detail/suppress_warnings.hpp>
//____________________________________________________________________________//
@@ -359,6 +363,9 @@
struct print_log_value {
void operator()( std::ostream& ostr, T const& t )
{
+ // avoid warning: 'boost::test_tools::<unnamed>::dummy_cond' defined but not used
+ if (::boost::test_tools::dummy_cond) {}
+
typedef typename mpl::or_<is_array<T>,is_function<T>,is_abstract<T> >::type couldnt_use_nl;
set_precision( ostr, couldnt_use_nl() );
@@ -381,7 +388,7 @@
namespace boost { namespace test_tools { namespace tt_detail { \
template<> \
struct print_log_value<the_type > { \
- void operator()( std::ostream& ostr, the_type const& t ) {} \
+ void operator()( std::ostream&, the_type const& ) {} \
}; \
}}} \
/**/
Modified: trunk/boost/test/utils/iterator/istream_line_iterator.hpp
==============================================================================
--- trunk/boost/test/utils/iterator/istream_line_iterator.hpp (original)
+++ trunk/boost/test/utils/iterator/istream_line_iterator.hpp 2008-07-07 01:41:14 EDT (Mon, 07 Jul 2008)
@@ -74,7 +74,7 @@
// increment implementation
bool get()
{
- return std::getline( *m_input_stream, this->m_value, m_delimeter );
+ return std::getline( *m_input_stream, this->m_value, m_delimeter ) != (void*)0;
}
// Data members
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