]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/bimap/test/test_bimap_range.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / bimap / test / test_bimap_range.cpp
index 747b5934a8eb2358c542a6aa28083784dd2a34d6..bf361f8514c93c18b267a2a560e409c459f36960 100644 (file)
 
 #include <boost/config.hpp>
 
-// Boost.Test
-#include <boost/test/minimal.hpp>
+#include <boost/core/ignore_unused.hpp>
+#include <boost/core/lightweight_test.hpp>
 
 #include <boost/config.hpp>
 
 #include <algorithm>
 
 #include <boost/range/functions.hpp>
-#include <boost/range/metafunctions.hpp>
+#include <boost/range/const_iterator.hpp>
 
 #include <boost/bimap/bimap.hpp>
 #include <boost/bimap/multiset_of.hpp>
@@ -51,7 +51,7 @@ struct do_something_with_a_pair
     template< class Pair >
     void operator()(const Pair & p)
     {
-        BOOST_CHECK( p.first && p.second );
+        BOOST_TEST( p.first && p.second );
     }
 };
 
@@ -80,9 +80,9 @@ int test_bimap_range()
     {
 
     bm_type::left_range_type r = bm.left.range( 2.0 < _key, _key < 4.0 );
-    BOOST_CHECK( ! boost::empty(r) );
-    BOOST_CHECK( boost::begin(r) == bm.left.upper_bound(2.0) );
-    BOOST_CHECK( boost::end(r)   == bm.left.lower_bound(4.0) );
+    BOOST_TEST( ! boost::empty(r) );
+    BOOST_TEST( boost::begin(r) == bm.left.upper_bound(2.0) );
+    BOOST_TEST( boost::end(r)   == bm.left.lower_bound(4.0) );
 
     }
 
@@ -90,9 +90,9 @@ int test_bimap_range()
     {
 
     bm_type::right_range_type r = bm.right.range( 2 <= _key, _key <= 3 );
-    BOOST_CHECK( ! boost::empty(r) );
-    BOOST_CHECK( boost::begin(r) == bm.right.lower_bound(2) );
-    BOOST_CHECK( boost::end(r)   == bm.right.upper_bound(3) );
+    BOOST_TEST( ! boost::empty(r) );
+    BOOST_TEST( boost::begin(r) == bm.right.lower_bound(2) );
+    BOOST_TEST( boost::end(r)   == bm.right.upper_bound(3) );
 
     }
 
@@ -101,7 +101,8 @@ int test_bimap_range()
 
     bm_type:: left_const_range_type lr = bm. left.range( unbounded, _key < 4.0 );
     bm_type::right_const_range_type rr = bm.right.range( 2 < _key ,  unbounded );
-
+    boost::ignore_unused(lr);
+    boost::ignore_unused(rr);
     }
 
     const bm_type & cbm = bm;
@@ -109,8 +110,8 @@ int test_bimap_range()
     // left const range
     {
     bm_type:: left_const_range_type r = cbm.left.range( unbounded, unbounded );
-    BOOST_CHECK( ! boost::empty(r) );
-    BOOST_CHECK( boost::begin(r) == cbm.left.begin() );
+    BOOST_TEST( ! boost::empty(r) );
+    BOOST_TEST( boost::begin(r) == cbm.left.begin() );
 
     }
 
@@ -118,7 +119,7 @@ int test_bimap_range()
     {
 
     bm_type::right_const_range_type r = cbm.right.range( 1 < _key, _key < 1 );
-    BOOST_CHECK( boost::empty(r) );
+    BOOST_TEST( boost::empty(r) );
 
     }
 
@@ -126,9 +127,9 @@ int test_bimap_range()
 }
 //]
 
-int test_main( int, char* [] )
+int main()
 {
     test_bimap_range();
-    return 0;
+    return boost::report_errors();
 }