diff options
author | Matthew Newhook <matthew@zeroc.com> | 2005-08-22 06:38:54 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2005-08-22 06:38:54 +0000 |
commit | 8878eb2d6e1da17022cd85f99e8dc216b0dd3b96 (patch) | |
tree | ddb11af48c2648fc76addb48785a2ae489bb6655 /cppe/test/IceE/operations/AllTests.cpp | |
parent | moving MIDP UUID generation to main srcs (diff) | |
download | ice-8878eb2d6e1da17022cd85f99e8dc216b0dd3b96.tar.bz2 ice-8878eb2d6e1da17022cd85f99e8dc216b0dd3b96.tar.xz ice-8878eb2d6e1da17022cd85f99e8dc216b0dd3b96.zip |
Simplify operations test.
Diffstat (limited to 'cppe/test/IceE/operations/AllTests.cpp')
-rw-r--r-- | cppe/test/IceE/operations/AllTests.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cppe/test/IceE/operations/AllTests.cpp b/cppe/test/IceE/operations/AllTests.cpp index 1cc81134eaa..6ed4ba397cf 100644 --- a/cppe/test/IceE/operations/AllTests.cpp +++ b/cppe/test/IceE/operations/AllTests.cpp @@ -78,6 +78,36 @@ allTests(const Ice::CommunicatorPtr& communicator) tprintf("ok\n"); + tprintf("testing checked cast with context..."); + ref = communicator->getProperties()->getPropertyWithDefault( + "Operations.ContextProxy", "context:default -p 12345 -t 10000"); + Ice::ObjectPrx cbase = communicator->stringToProxy(ref); + test(cbase); + + Test::TestCheckedCastPrx tccp = Test::TestCheckedCastPrx::checkedCast(cbase); + Ice::Context c = tccp->getContext(); + test(c.size() == 0); + + c["one"] = "hello"; + c["two"] = "world"; + tccp = Test::TestCheckedCastPrx::checkedCast(cbase, c); + Ice::Context c2 = tccp->getContext(); + test(c == c2); + + // + // Now with alternate API + // + tccp = checkedCast<Test::TestCheckedCastPrx>(cbase); + c = tccp->getContext(); + test(c.size() == 0); + + tccp = checkedCast<Test::TestCheckedCastPrx>(cbase, c); + c2 = tccp->getContext(); + test(c == c2); + + tprintf("ok\n"); +//XXXX: + tprintf("testing twoway operations... "); void twoways(const Ice::CommunicatorPtr&, const Test::MyClassPrx&); twoways(communicator, cl); |