diff options
Diffstat (limited to 'cpp/test/Ice/exceptions/AllTests.cpp')
-rw-r--r-- | cpp/test/Ice/exceptions/AllTests.cpp | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp index 4850d9e32b7..69a9ebe662c 100644 --- a/cpp/test/Ice/exceptions/AllTests.cpp +++ b/cpp/test/Ice/exceptions/AllTests.cpp @@ -1170,6 +1170,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(false); } } + { auto f = thrower->throwAorDasAorD_async(1); try @@ -1186,6 +1187,7 @@ allTests(const Ice::CommunicatorPtr& communicator) test(false); } } + { auto f = thrower->throwAorDasAorD_async(-1); try @@ -1258,6 +1260,99 @@ allTests(const Ice::CommunicatorPtr& communicator) test(false); } } + + // + // repeat with callback API and no exception callback + // + { + promise<bool> sent; + thrower->throwAasA_async(1, + []() + { + test(false); + }, + nullptr, + [&](bool value) + { + sent.set_value(value); + }); + sent.get_future().get(); // Wait for sent + } + + { + promise<bool> sent; + thrower->throwAorDasAorD_async(1, + []() + { + test(false); + }, + nullptr, + [&](bool value) + { + sent.set_value(value); + }); + sent.get_future().get(); // Wait for sent + } + + { + promise<bool> sent; + thrower->throwAorDasAorD_async(-1, + []() + { + test(false); + }, + nullptr, + [&](bool value) + { + sent.set_value(value); + }); + sent.get_future().get(); // Wait for sent + } + + { + promise<bool> sent; + thrower->throwBasB_async(1, 2, + []() + { + test(false); + }, + nullptr, + [&](bool value) + { + sent.set_value(value); + }); + sent.get_future().get(); // Wait for sent + } + + { + promise<bool> sent; + thrower->throwCasC_async(1, 2, 3, + []() + { + test(false); + }, + nullptr, + [&](bool value) + { + sent.set_value(value); + }); + sent.get_future().get(); // Wait for sent + } + + { + promise<bool> sent; + thrower->throwModA_async(1, 2, + []() + { + test(false); + }, + nullptr, + [&](bool value) + { + sent.set_value(value); + }); + sent.get_future().get(); // Wait for sent + } #else { CallbackPtr cb = new Callback; |