]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/function/test/function_test.cpp
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / boost / libs / function / test / function_test.cpp
index cce4365ff733586378d3d8a48c2469d3a536e2e1..88747e01a984a17d28bc4a2b0d947c3c9d24d663 100644 (file)
@@ -7,12 +7,14 @@
 
 // For more information, see http://www.boost.org
 
-#include <boost/test/minimal.hpp>
 #include <boost/function.hpp>
+#include <boost/core/lightweight_test.hpp>
 #include <functional>
 #include <string>
 #include <utility>
 
+#define BOOST_CHECK BOOST_TEST
+
 using boost::function;
 using std::string;
 
@@ -624,7 +626,7 @@ test_ref()
     boost::function<int (int, int)> f(boost::ref(atc));
     BOOST_CHECK(f(1, 3) == 4);
   }
-  catch(std::runtime_error e) {
+  catch(std::runtime_error const&) {
     BOOST_ERROR("Nonthrowing constructor threw an exception");
   }
 }
@@ -651,14 +653,14 @@ static void test_empty_ref()
     f2();
     BOOST_ERROR("Exception didn't throw for reference to empty function.");
   }
-  catch(std::runtime_error e) {}
+  catch(std::runtime_error const&) {}
 
   f1 = dummy;
 
   try {
     f2();
   }
-  catch(std::runtime_error e) {
+  catch(std::runtime_error const&) {
     BOOST_ERROR("Error calling referenced function.");
   }
 }
@@ -673,7 +675,7 @@ static void test_exception()
     f(5, 4);
     BOOST_CHECK(false);
   }
-  catch(boost::bad_function_call) {
+  catch(boost::bad_function_call const&) {
     // okay
   }
 }
@@ -792,7 +794,7 @@ static void test_move_semantics()
 #endif  
 }
 
-int test_main(int, char* [])
+int main()
 {
   test_zero_args();
   test_one_arg();
@@ -807,5 +809,5 @@ int test_main(int, char* [])
   test_move_semantics<function<void()> >();
   test_move_semantics<boost::function0<void> >();
 
-  return 0;
+  return boost::report_errors();
 }