diff options
author | Jose <jose@zeroc.com> | 2016-01-05 11:48:16 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2016-01-05 11:48:16 +0100 |
commit | 4d1c6b6b624234b04b2fb09d189039a4a9e309e7 (patch) | |
tree | 4736296b8a85698630226a0a258e7a4cdaa31c40 /cpp/test/Ice/exceptions/AllTests.cpp | |
parent | Removed un-used member to fix OS X build failure (diff) | |
download | ice-4d1c6b6b624234b04b2fb09d189039a4a9e309e7.tar.bz2 ice-4d1c6b6b624234b04b2fb09d189039a4a9e309e7.tar.xz ice-4d1c6b6b624234b04b2fb09d189039a4a9e309e7.zip |
C++11 test fixes
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; |