X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ceph%2Fsrc%2Fboost%2Flibs%2Fsystem%2Ftest%2Ffailed_test.cpp;h=118d35f23d61f82a6d4ae88b624c32d3213efc2e;hb=1e59de90020f1d8d374046ef9cca56ccd4e806e2;hp=9f00b340c6ce570723c90944c31989a1f14cd45a;hpb=bd41e436e25044e8e83156060a37c23cb661c364;p=ceph.git diff --git a/ceph/src/boost/libs/system/test/failed_test.cpp b/ceph/src/boost/libs/system/test/failed_test.cpp index 9f00b340c..118d35f23 100644 --- a/ceph/src/boost/libs/system/test/failed_test.cpp +++ b/ceph/src/boost/libs/system/test/failed_test.cpp @@ -120,30 +120,18 @@ template void test() ec.assign( 0, generic_category() ); TEST_NOT_FAILED( ec ); } -} - -template void test2() -{ - Ec ec( 0, http_category() ); - TEST_FAILED( ec ); - ec.assign( 200, http_category() ); - TEST_NOT_FAILED( ec ); - - ec = Ec( 404, http_category() ); - TEST_FAILED( ec ); -} + { + Ec ec( 0, http_category() ); + TEST_FAILED( ec ); -template void test3() -{ - Ec ec( 0, http_category() ); - BOOST_TEST( ec.failed() ); + ec.assign( 200, http_category() ); + TEST_NOT_FAILED( ec ); - ec.assign( 200, http_category() ); - BOOST_TEST( !ec.failed() ); + ec = Ec( 404, http_category() ); + TEST_FAILED( ec ); + } - ec = Ec( 404, http_category() ); - BOOST_TEST( ec.failed() ); } int main() @@ -159,9 +147,7 @@ int main() BOOST_TEST( http_category().failed( 404 ) ); test(); - test2(); test(); - test3(); { error_condition ec( errc::success );