Boost logo

Boost-Commit :

From: nesotto_at_[hidden]
Date: 2008-06-24 11:38:51


Author: nesotto
Date: 2008-06-24 11:38:50 EDT (Tue, 24 Jun 2008)
New Revision: 46649
URL: http://svn.boost.org/trac/boost/changeset/46649

Log:
bug-fixes from trunk
Text files modified:
   branches/release/libs/range/doc/history_ack.html | 4 ++--
   branches/release/libs/range/doc/intro.html | 2 +-
   branches/release/libs/range/doc/style.html | 2 +-
   branches/release/libs/range/doc/utility_class.html | 6 +++---
   branches/release/libs/range/index.html | 2 +-
   branches/release/libs/range/test/Jamfile.v2 | 4 ++--
   branches/release/libs/range/test/partial_workaround.cpp | 8 +++++++-
   branches/release/libs/range/test/string.cpp | 34 ++++++++++++++++------------------
   8 files changed, 33 insertions(+), 29 deletions(-)

Modified: branches/release/libs/range/doc/history_ack.html
==============================================================================
--- branches/release/libs/range/doc/history_ack.html (original)
+++ branches/release/libs/range/doc/history_ack.html 2008-06-24 11:38:50 EDT (Tue, 24 Jun 2008)
@@ -19,9 +19,9 @@
     <h2 >History and Acknowledgement</h2><a name="History" ></a>
     <p >
     The library was under way for a long time. Dietmar Kühl originally intended
- to submit an <code>array_traits</code> class template which had most of
+ to submit an <code >array_traits</code> class template which had most of
     the functionality present now, but only for arrays and standard containers.
- I believe this was back in 2001 or 2002.
+ I believe this was back in 2001 or 2002.
     </p>
     
     <p>

Modified: branches/release/libs/range/doc/intro.html
==============================================================================
--- branches/release/libs/range/doc/intro.html (original)
+++ branches/release/libs/range/doc/intro.html 2008-06-24 11:38:50 EDT (Tue, 24 Jun 2008)
@@ -24,7 +24,7 @@
     to a somewhat clumsy use of the algorithms with redundant specification
     of container names. Therefore we would like to raise the abstraction level
     for algorithms so they specify their interface in terms of <a
- href=range.html>Ranges</a> as much as possible.
+ href="range.html">Ranges</a> as much as possible.
     </p>
 
     <p>

Modified: branches/release/libs/range/doc/style.html
==============================================================================
--- branches/release/libs/range/doc/style.html (original)
+++ branches/release/libs/range/doc/style.html 2008-06-24 11:38:50 EDT (Tue, 24 Jun 2008)
@@ -53,7 +53,7 @@
                     <a href="range.html#bidirectional_range">Bidirectional Range</a> <li>
                     <a href="range.html#random_access_range">Random Access Range</a> </ul>
     </ul>
- Notice how we have used the categories from the <a href=../../iterator/doc/new-iter-concepts.html>new
+ Notice how we have used the categories from the <a href="../../iterator/doc/new-iter-concepts.html">new
     style iterators</a>.
 
     <p>

Modified: branches/release/libs/range/doc/utility_class.html
==============================================================================
--- branches/release/libs/range/doc/utility_class.html (original)
+++ branches/release/libs/range/doc/utility_class.html 2008-06-24 11:38:50 EDT (Tue, 24 Jun 2008)
@@ -27,9 +27,9 @@
 
     <ul>
         <li>
- Class <a href=#iter_range><code>iterator_range</code></a>
+ Class iterator_range
         <li>
- Class <a href=#sub_range><code>sub_range</code></a>
+ Class sub_range
     </ul>
     </ul>
 
@@ -329,7 +329,7 @@
         <span class=keyword>const </span><span class=identifier>value_type</span><span class=special>&amp; </span><span class=keyword>operator</span><span class=special>[]( </span><span class=identifier>difference_type </span><span class=identifier>at </span><span class=special>) </span><span class=keyword>const</span><span class=special>;</span>
     
     <span class=keyword>public</span><span class=special>:
- </span><span class=comment>// rest of interface inherited from <a href=#iter_range><code>iterator_range</code></a>
+ </span><span class=comment>// rest of interface inherited from iterator_range
     </span><span class=special>};
     </span>
 <span class=special>} </span><span class=comment>// namespace 'boost'</span>

Modified: branches/release/libs/range/index.html
==============================================================================
--- branches/release/libs/range/index.html (original)
+++ branches/release/libs/range/index.html 2008-06-24 11:38:50 EDT (Tue, 24 Jun 2008)
@@ -22,7 +22,7 @@
   </p>
   <p>
   Use, modification and distribution is subject to the Boost Software License, Version 1.0
- (see <a href=http://www.boost.org/LICENSE_1_0.txt>
+ (see <a href="http://www.boost.org/LICENSE_1_0.txt">
    http://www.boost.org/LICENSE_1_0.txt>).
   </p>
 

Modified: branches/release/libs/range/test/Jamfile.v2
==============================================================================
--- branches/release/libs/range/test/Jamfile.v2 (original)
+++ branches/release/libs/range/test/Jamfile.v2 2008-06-24 11:38:50 EDT (Tue, 24 Jun 2008)
@@ -12,9 +12,9 @@
 {
     return [
         run $(name).cpp /boost/test//boost_unit_test_framework/<link>static
+ :
         :
- :
- : $(includes)
+ : <toolset>gcc:<cxxflags>"-Wall -Wunused "
         ] ;
 }
 

Modified: branches/release/libs/range/test/partial_workaround.cpp
==============================================================================
--- branches/release/libs/range/test/partial_workaround.cpp (original)
+++ branches/release/libs/range/test/partial_workaround.cpp 2008-06-24 11:38:50 EDT (Tue, 24 Jun 2008)
@@ -10,6 +10,8 @@
 
 #include <boost/config.hpp>
 #include <boost/detail/workaround.hpp>
+#include <boost/range/detail/implementation_help.hpp>
+#include <boost/test/test_tools.hpp>
 
 #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
 # pragma warn -8091 // supress warning in Boost.Test
@@ -30,7 +32,6 @@
 
 #include <boost/static_assert.hpp>
 #include <boost/type_traits.hpp>
-#include <boost/test/test_tools.hpp>
 #include <iostream>
 #include <vector>
 
@@ -91,6 +92,11 @@
 
 void check_partial_workaround()
 {
+ //
+ // test if warnings are generated
+ //
+ std::size_t s = boost::range_detail::array_size( "foo" );
+ BOOST_CHECK_EQUAL( s, 4u );
 }
 
 #endif

Modified: branches/release/libs/range/test/string.cpp
==============================================================================
--- branches/release/libs/range/test/string.cpp (original)
+++ branches/release/libs/range/test/string.cpp 2008-06-24 11:38:50 EDT (Tue, 24 Jun 2008)
@@ -137,14 +137,7 @@
     BOOST_CHECK_EQUAL( str_end( char_s ), str_end1 );
     BOOST_CHECK_EQUAL( str_empty( char_s ), (char_s == 0 || char_s[0] == char()) );
     BOOST_CHECK_EQUAL( sz, std::char_traits<char>::length( char_s ) );
-/*
- BOOST_CHECK_EQUAL( str_begin( char_s2 ), char_s2 );
- std::size_t sz2 = size( char_s2 );
- const char* str_end12 = str_begin( char_s2 ) + sz;
- BOOST_CHECK_EQUAL( str_end( char_s2 ), str_end12 );
- BOOST_CHECK_EQUAL( empty( char_s2 ), (char_s2 == 0 || char_s2[0] == char()) );
- BOOST_CHECK_EQUAL( sz2, std::char_traits<char>::length( char_s2 ) );
-*/
+
     BOOST_CHECK_EQUAL( str_begin( my_string ), my_string );
     range_iterator<char_array_t>::type str_end2 = str_begin( my_string ) + str_size(my_string);
     range_iterator<char_array_t>::type str_end3 = str_end(my_string);
@@ -165,6 +158,20 @@
 
     BOOST_CHECK( find_const( as_array( my_string ), to_search ) != str_end(my_string) );
     BOOST_CHECK( find_const( as_array( my_const_string ), to_search ) != str_end(my_string) );
+
+ //
+ // Test that as_literal() always scan for null terminator
+ //
+ char an_array[] = "foo\0bar";
+ BOOST_CHECK_EQUAL( str_begin( an_array ), an_array );
+ BOOST_CHECK_EQUAL( str_end( an_array ), an_array + 3 );
+ BOOST_CHECK_EQUAL( str_size( an_array ), 3 );
+
+ const char a_const_array[] = "foobar\0doh";
+ BOOST_CHECK_EQUAL( str_begin( a_const_array ), a_const_array );
+ BOOST_CHECK_EQUAL( str_end( a_const_array ), a_const_array + 6 );
+ BOOST_CHECK_EQUAL( str_size( a_const_array ), 6 );
+
 }
 
 
@@ -172,9 +179,6 @@
 void check_string()
 {
     check_char();
-// check_char<volatile char>();
-// check_char<const char>();
-// check_char<const volatile char>();
     
 #ifndef BOOST_NO_STD_WSTRING
     typedef wchar_t* wchar_iterator_t;
@@ -197,13 +201,7 @@
     BOOST_CHECK_EQUAL( str_end(char_ws), (str_begin( char_ws ) + sz) );
     BOOST_CHECK_EQUAL( str_empty( char_ws ), (char_ws == 0 || char_ws[0] == wchar_t()) );
     BOOST_CHECK_EQUAL( sz, std::char_traits<wchar_t>::length( char_ws ) );
- /*
- std::size_t sz2 = size( char_ws2 );
- BOOST_CHECK_EQUAL( str_begin( char_ws2 ), char_ws2 );
- BOOST_CHECK_EQUAL( str_end( char_ws2 ), (begin( char_ws2 ) + sz2) );
- BOOST_CHECK_EQUAL( empty( char_ws2 ), (char_ws2 == 0 || char_ws2[0] == wchar_t()) );
- BOOST_CHECK_EQUAL( sz2, std::char_traits<wchar_t>::length( char_ws2 ) );
- */
+
     wchar_t to_search = L'n';
     BOOST_CHECK( find( char_ws, to_search ) != str_end(char_ws) );
 


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