]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/system/test/failed_test.cpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / libs / system / test / failed_test.cpp
index 142d6ef8f436eb918c4d471500a225d42009b9e4..9f00b340c6ce570723c90944c31989a1f14cd45a 100644 (file)
@@ -120,18 +120,30 @@ template<class Ec> void test()
         ec.assign( 0, generic_category() );
         TEST_NOT_FAILED( ec );
     }
+}
 
-    {
-        Ec ec( 0, http_category() );
-        BOOST_TEST( ec.failed() );
+template<class Ec> void test2()
+{
+    Ec ec( 0, http_category() );
+    TEST_FAILED( ec );
 
-        ec.assign( 200, http_category() );
-        BOOST_TEST( !ec.failed() );
+    ec.assign( 200, http_category() );
+    TEST_NOT_FAILED( ec );
 
-        ec = Ec( 404, http_category() );
-        BOOST_TEST( ec.failed() );
-    }
+    ec = Ec( 404, http_category() );
+    TEST_FAILED( ec );
+}
+
+template<class Ec> void test3()
+{
+    Ec ec( 0, http_category() );
+    BOOST_TEST( ec.failed() );
+
+    ec.assign( 200, http_category() );
+    BOOST_TEST( !ec.failed() );
 
+    ec = Ec( 404, http_category() );
+    BOOST_TEST( ec.failed() );
 }
 
 int main()
@@ -147,7 +159,9 @@ int main()
     BOOST_TEST( http_category().failed( 404 ) );
 
     test<error_code>();
+    test2<error_code>();
     test<error_condition>();
+    test3<error_condition>();
 
     {
         error_condition ec( errc::success );