]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/property_map/test/transform_value_property_map_test.cpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / property_map / test / transform_value_property_map_test.cpp
index d9032f447a59533e0bc0a4b138870d57c005cee1..d0fcfcc226943914c21e719607d60df304f8d1fa 100644 (file)
@@ -14,7 +14,7 @@
 #include <boost/property_map/transform_value_property_map.hpp>
 #include <boost/concept/assert.hpp>
 #include <boost/property_map/property_map.hpp>
-#include <boost/test/minimal.hpp>
+#include <boost/core/lightweight_test.hpp>
 #include <boost/static_assert.hpp>
 
 // Ensure this is not default constructible
@@ -34,7 +34,7 @@ struct return_fixed_ref {
   int& operator()(const T&) const {return *ptr;}
 };
 
-int test_main(int, char**) {
+int main() {
   using namespace boost;
   typedef function_property_map<times2, int> PM;
   PM orig_pm(times2(0));
@@ -51,22 +51,22 @@ int test_main(int, char**) {
   BOOST_STATIC_ASSERT((boost::is_same<boost::property_traits<transform_value_property_map<add1_val<int>, PM> >::category, boost::readable_property_map_tag>::value));
   BOOST_STATIC_ASSERT((boost::is_same<boost::property_traits<transform_value_property_map<return_fixed_ref<int>, PM> >::category, boost::lvalue_property_map_tag>::value));
 
-  BOOST_CHECK(get(transform_value_property_map<add1<int>, PM>(add1<int>(), orig_pm), 3) == 7);
-  BOOST_CHECK(get(transform_value_property_map<add1<int>, PM>(add1<int>(), orig_pm), 4) == 9);
-  BOOST_CHECK(get(make_transform_value_property_map(add1<int>(), orig_pm), 5) == 11);
-  BOOST_CHECK(get(transform_value_property_map<add1_val<int>, PM>(add1_val<int>(), orig_pm), 3) == 7);
-  BOOST_CHECK(get(transform_value_property_map<add1_val<int>, PM>(add1_val<int>(), orig_pm), 4) == 9);
-  BOOST_CHECK(get(make_transform_value_property_map<int>(add1_val<int>(), orig_pm), 5) == 11);
+  BOOST_TEST(get(transform_value_property_map<add1<int>, PM>(add1<int>(), orig_pm), 3) == 7);
+  BOOST_TEST(get(transform_value_property_map<add1<int>, PM>(add1<int>(), orig_pm), 4) == 9);
+  BOOST_TEST(get(make_transform_value_property_map(add1<int>(), orig_pm), 5) == 11);
+  BOOST_TEST(get(transform_value_property_map<add1_val<int>, PM>(add1_val<int>(), orig_pm), 3) == 7);
+  BOOST_TEST(get(transform_value_property_map<add1_val<int>, PM>(add1_val<int>(), orig_pm), 4) == 9);
+  BOOST_TEST(get(make_transform_value_property_map<int>(add1_val<int>(), orig_pm), 5) == 11);
   int val;
   const transform_value_property_map<return_fixed_ref<int>, PM> pm(return_fixed_ref<int>((&val)), orig_pm);
   put(pm, 1, 6);
-  BOOST_CHECK(get(pm, 2) == 6);
-  BOOST_CHECK((get(pm, 3) = 7) == 7);
-  BOOST_CHECK(get(pm, 4) == 7);
+  BOOST_TEST(get(pm, 2) == 6);
+  BOOST_TEST((get(pm, 3) = 7) == 7);
+  BOOST_TEST(get(pm, 4) == 7);
   const transform_value_property_map<return_fixed_ref<int>, PM> pm2 = pm; // Check shallow copying
-  BOOST_CHECK(get(pm2, 5) == 7);
+  BOOST_TEST(get(pm2, 5) == 7);
   put(pm2, 3, 1);
-  BOOST_CHECK(get(pm, 1) == 1);
+  BOOST_TEST(get(pm, 1) == 1);
 
-  return 0;
+  return boost::report_errors();
 }