summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/ami/AllTests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/ami/AllTests.cpp')
-rw-r--r--cpp/test/Ice/ami/AllTests.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/cpp/test/Ice/ami/AllTests.cpp b/cpp/test/Ice/ami/AllTests.cpp
index 35fe85d9638..da4b801009c 100644
--- a/cpp/test/Ice/ami/AllTests.cpp
+++ b/cpp/test/Ice/ami/AllTests.cpp
@@ -1298,7 +1298,6 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
{
}
}
-
}
cout << "ok" << endl;
@@ -2386,6 +2385,32 @@ allTests(const Ice::CommunicatorPtr& communicator, bool collocated)
}
}
+ {
+ cout << "testing result struct... " << flush;
+
+ auto q = Ice::uncheckedCast<Test::Outer::Inner::TestIntfPrx>(
+ communicator->stringToProxy("test2:" + getTestEndpoint(communicator, 0)));
+
+ promise<void> promise;
+ q->opAsync(1,
+ [&promise](int i, int j)
+ {
+ test(i == j);
+ promise.set_value();
+ },
+ [](const exception_ptr& ex)
+ {
+ test(false);
+ });
+ promise.get_future().get();
+
+ auto f = q->opAsync(1);
+ auto r = f.get();
+ test(r.returnValue == r.j);
+ test(r.returnValue == 1);
+ cout << "ok" << endl;
+ }
+
p->shutdown();
#else