|
Boost-Commit : |
From: gennadiy.rozental_at_[hidden]
Date: 2008-07-24 23:52:53
Author: rogeeff
Date: 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
New Revision: 47788
URL: http://svn.boost.org/trac/boost/changeset/47788
Log:
date
Text files modified:
trunk/libs/test/example/unit_test_example_07.cpp | 2
trunk/libs/test/src/test_main.cpp | 2
trunk/libs/test/test/algorithms_test.cpp | 2
trunk/libs/test/test/basic_cstring_test.cpp | 68 +++++++++++++++++++++------------------
trunk/libs/test/test/boost_check_equal_str.cpp | 2
trunk/libs/test/test/class_properties_test.cpp | 3 -
trunk/libs/test/test/config_file_iterator_test.cpp | 2
trunk/libs/test/test/config_file_test.cpp | 2
trunk/libs/test/test/custom_exception_test.cpp | 2
trunk/libs/test/test/errors_handling_test.cpp | 4 +-
trunk/libs/test/test/fixed_mapping_test.cpp | 2
trunk/libs/test/test/foreach_test.cpp | 2
trunk/libs/test/test/ifstream_line_iterator_test.cpp | 2
13 files changed, 50 insertions(+), 45 deletions(-)
Modified: trunk/libs/test/example/unit_test_example_07.cpp
==============================================================================
--- trunk/libs/test/example/unit_test_example_07.cpp (original)
+++ trunk/libs/test/example/unit_test_example_07.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -29,7 +29,7 @@
// each produced test case uses struct F as a fixture
BOOST_AUTO_TEST_CASE_TEMPLATE( my_test, T, test_types )
{
- T t = i;
+ T t = static_cast<T>(i);
// usually it's a bad idea to use BOOST_CHECK_EQUAL for checking equality values of
// floating point types. This check may or may not produce an error report
Modified: trunk/libs/test/src/test_main.cpp
==============================================================================
--- trunk/libs/test/src/test_main.cpp (original)
+++ trunk/libs/test/src/test_main.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2005.
+// (C) Copyright Gennadiy Rozental 2005-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
Modified: trunk/libs/test/test/algorithms_test.cpp
==============================================================================
--- trunk/libs/test/test/algorithms_test.cpp (original)
+++ trunk/libs/test/test/algorithms_test.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2003-2007.
+// (C) Copyright Gennadiy Rozental 2003-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
Modified: trunk/libs/test/test/basic_cstring_test.cpp
==============================================================================
--- trunk/libs/test/test/basic_cstring_test.cpp (original)
+++ trunk/libs/test/test/basic_cstring_test.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2007.
+// (C) Copyright Gennadiy Rozental 2001-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -12,6 +12,10 @@
// Description : basic_cstring unit test
// *****************************************************************************
+#ifdef _MSC_VER
+#pragma warning(disable: 4996)
+#endif
+
// Boost.Test
#include <boost/test/unit_test.hpp>
#include <boost/test/test_case_template.hpp>
@@ -90,19 +94,19 @@
{
{
utf::basic_cstring<CharT> bcs;
- BOOST_CHECK_EQUAL( bcs.size(), 0 );
+ BOOST_CHECK_EQUAL( bcs.size(), (unsigned)0 );
BOOST_CHECK( bcs.is_empty() );
}
{
utf::basic_cstring<CharT> bcs( utf::basic_cstring<CharT>::null_str() );
- BOOST_CHECK_EQUAL( bcs.size(), 0 );
+ BOOST_CHECK_EQUAL( bcs.size(), (unsigned)0 );
BOOST_CHECK( bcs.is_empty() );
}
{
utf::basic_cstring<CharT> bcs( 0 );
- BOOST_CHECK_EQUAL( bcs.size(), 0 );
+ BOOST_CHECK_EQUAL( bcs.size(), (unsigned)0 );
BOOST_CHECK( bcs.is_empty() );
}
@@ -195,24 +199,24 @@
{
utf::basic_cstring<CharT> bcs1;
- BOOST_CHECK_EQUAL( bcs1.size(), 0 );
+ BOOST_CHECK_EQUAL( bcs1.size(), (unsigned)0 );
BOOST_CHECK( bcs1.is_empty() );
bcs1 = TEST_STRING;
- BOOST_CHECK_EQUAL( bcs1.size(), 11 );
+ BOOST_CHECK_EQUAL( bcs1.size(), (unsigned)11 );
bcs1.clear();
- BOOST_CHECK_EQUAL( bcs1.size(), 0 );
+ BOOST_CHECK_EQUAL( bcs1.size(), (unsigned)0 );
BOOST_CHECK( bcs1.is_empty() );
bcs1 = utf::basic_cstring<CharT>( TEST_STRING, 4 );
- BOOST_CHECK_EQUAL( bcs1.size(), 4 );
+ BOOST_CHECK_EQUAL( bcs1.size(), (unsigned)4 );
bcs1.resize( 5 );
- BOOST_CHECK_EQUAL( bcs1.size(), 4 );
+ BOOST_CHECK_EQUAL( bcs1.size(), (unsigned)4 );
bcs1.resize( 3 );
- BOOST_CHECK_EQUAL( bcs1.size(), 3 );
+ BOOST_CHECK_EQUAL( bcs1.size(), (unsigned)3 );
}
//____________________________________________________________________________//
@@ -332,11 +336,11 @@
LOCAL_DEF( bcs0, "tes" );
bcs0.trim_right( 1 );
- BOOST_CHECK_EQUAL( bcs0.size(), 2 );
+ BOOST_CHECK_EQUAL( bcs0.size(), (unsigned)2 );
BOOST_CHECK_EQUAL( bcs0[0], 't' );
bcs0.trim_left( 1 );
- BOOST_CHECK_EQUAL( bcs0.size(), 1 );
+ BOOST_CHECK_EQUAL( bcs0.size(), (unsigned)1 );
BOOST_CHECK_EQUAL( bcs0[0], 'e' );
bcs0.trim_left( 1 );
@@ -402,25 +406,27 @@
{
utf::basic_cstring<CharT> bcs1( TEST_STRING );
- BOOST_CHECK_EQUAL( bcs1.find( utf::basic_cstring<CharT>() ), utf::basic_cstring<CharT>::npos );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "test" ) ), 0 );
- BOOST_CHECK_EQUAL( bcs1.find( TEST_STRING ), 0 );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "test_string " ) ), utf::basic_cstring<CharT>::npos );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( " test_string" ) ), utf::basic_cstring<CharT>::npos );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "est" ) ), 1 );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "t_st" ) ), 3 );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "ing" ) ), 8 );
- BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "tst" ) ), utf::basic_cstring<CharT>::npos );
-
- BOOST_CHECK_EQUAL( bcs1.rfind( utf::basic_cstring<CharT>() ), utf::basic_cstring<CharT>::npos );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "test" ) ), 0 );
- BOOST_CHECK_EQUAL( bcs1.rfind( TEST_STRING ), 0 );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "test_string " ) ), utf::basic_cstring<CharT>::npos );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( " test_string" ) ), utf::basic_cstring<CharT>::npos );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "est" ) ), 1 );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "t_st" ) ), 3 );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "ing" ) ), 8 );
- BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "tst" ) ), utf::basic_cstring<CharT>::npos );
+ utf::basic_cstring<CharT>::size_type not_found = (utf::basic_cstring<CharT>::size_type)utf::basic_cstring<CharT>::npos;
+
+ BOOST_CHECK_EQUAL( bcs1.find( utf::basic_cstring<CharT>() ), not_found );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "test" ) ), (utf::basic_cstring<CharT>::size_type)0 );
+ BOOST_CHECK_EQUAL( bcs1.find( TEST_STRING ), (utf::basic_cstring<CharT>::size_type)0 );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "test_string " ) ), not_found );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( " test_string" ) ), not_found );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "est" ) ), (utf::basic_cstring<CharT>::size_type)1 );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "t_st" ) ), (utf::basic_cstring<CharT>::size_type)3 );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "ing" ) ), (utf::basic_cstring<CharT>::size_type)8 );
+ BOOST_CHECK_EQUAL( bcs1.find( LITERAL( "tst" ) ), not_found );
+
+ BOOST_CHECK_EQUAL( bcs1.rfind( utf::basic_cstring<CharT>() ), not_found );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "test" ) ), (utf::basic_cstring<CharT>::size_type)0 );
+ BOOST_CHECK_EQUAL( bcs1.rfind( TEST_STRING ), (utf::basic_cstring<CharT>::size_type)0 );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "test_string " ) ), not_found );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( " test_string" ) ), not_found );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "est" ) ), (utf::basic_cstring<CharT>::size_type)1 );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "t_st" ) ), (utf::basic_cstring<CharT>::size_type)3 );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "ing" ) ), (utf::basic_cstring<CharT>::size_type)8 );
+ BOOST_CHECK_EQUAL( bcs1.rfind( LITERAL( "tst" ) ), not_found );
}
//____________________________________________________________________________//
Modified: trunk/libs/test/test/boost_check_equal_str.cpp
==============================================================================
--- trunk/libs/test/test/boost_check_equal_str.cpp (original)
+++ trunk/libs/test/test/boost_check_equal_str.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2007.
+// (C) Copyright Gennadiy Rozental 2001-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
Modified: trunk/libs/test/test/class_properties_test.cpp
==============================================================================
--- trunk/libs/test/test/class_properties_test.cpp (original)
+++ trunk/libs/test/test/class_properties_test.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2003-2007.
+// (C) Copyright Gennadiy Rozental 2003-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
@@ -131,7 +131,6 @@
BOOST_CHECK( s == p_str );
BOOST_CHECK( p_str2 != p_str );
-
BOOST_CHECK_EQUAL( p_b->foo(), 1 );
BOOST_CHECK_EQUAL( p_one ^ 3, 2 );
Modified: trunk/libs/test/test/config_file_iterator_test.cpp
==============================================================================
--- trunk/libs/test/test/config_file_iterator_test.cpp (original)
+++ trunk/libs/test/test/config_file_iterator_test.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2007.
+// (C) Copyright Gennadiy Rozental 2001-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
Modified: trunk/libs/test/test/config_file_test.cpp
==============================================================================
--- trunk/libs/test/test/config_file_test.cpp (original)
+++ trunk/libs/test/test/config_file_test.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2007.
+// (C) Copyright Gennadiy Rozental 2001-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
Modified: trunk/libs/test/test/custom_exception_test.cpp
==============================================================================
--- trunk/libs/test/test/custom_exception_test.cpp (original)
+++ trunk/libs/test/test/custom_exception_test.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2003-2007.
+// (C) Copyright Gennadiy Rozental 2003-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
Modified: trunk/libs/test/test/errors_handling_test.cpp
==============================================================================
--- trunk/libs/test/test/errors_handling_test.cpp (original)
+++ trunk/libs/test/test/errors_handling_test.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2007.
+// (C) Copyright Gennadiy Rozental 2001-2008.
// (C) Copyright Beman Dawes 2001.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
@@ -46,7 +46,7 @@
output << line << ": ";
}
- void test_unit_finish( std::ostream& output, test_unit const& tu, unsigned long elapsed )
+ void test_unit_finish( std::ostream& output, test_unit const& tu, unsigned long )
{
output << "Leaving test " << tu.p_type_name << " \"" << tu.p_name << "\"" << std::endl;
}
Modified: trunk/libs/test/test/fixed_mapping_test.cpp
==============================================================================
--- trunk/libs/test/test/fixed_mapping_test.cpp (original)
+++ trunk/libs/test/test/fixed_mapping_test.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2007.
+// (C) Copyright Gennadiy Rozental 2001-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
Modified: trunk/libs/test/test/foreach_test.cpp
==============================================================================
--- trunk/libs/test/test/foreach_test.cpp (original)
+++ trunk/libs/test/test/foreach_test.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2007.
+// (C) Copyright Gennadiy Rozental 2001-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
Modified: trunk/libs/test/test/ifstream_line_iterator_test.cpp
==============================================================================
--- trunk/libs/test/test/ifstream_line_iterator_test.cpp (original)
+++ trunk/libs/test/test/ifstream_line_iterator_test.cpp 2008-07-24 23:52:52 EDT (Thu, 24 Jul 2008)
@@ -1,4 +1,4 @@
-// (C) Copyright Gennadiy Rozental 2001-2007.
+// (C) Copyright Gennadiy Rozental 2001-2008.
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
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