summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/operations/Server.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2004-12-03 04:12:39 +0000
committerMichi Henning <michi@zeroc.com>2004-12-03 04:12:39 +0000
commit1690923ef5a9f7b22c70ce343554cc41eb9f00e3 (patch)
tree8a98dfc73b86882e7dc72b1046220af23dc32cc5 /cpp/test/Ice/operations/Server.cpp
parentFixed VC build (diff)
downloadice-1690923ef5a9f7b22c70ce343554cc41eb9f00e3.tar.bz2
ice-1690923ef5a9f7b22c70ce343554cc41eb9f00e3.tar.xz
ice-1690923ef5a9f7b22c70ce343554cc41eb9f00e3.zip
Added ::Ice::Context parameter to checkedCast.
Diffstat (limited to 'cpp/test/Ice/operations/Server.cpp')
-rw-r--r--cpp/test/Ice/operations/Server.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/cpp/test/Ice/operations/Server.cpp b/cpp/test/Ice/operations/Server.cpp
index 8bfac161335..1cdf2896382 100644
--- a/cpp/test/Ice/operations/Server.cpp
+++ b/cpp/test/Ice/operations/Server.cpp
@@ -20,6 +20,17 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
Ice::ObjectPtr object = new MyDerivedClassI(adapter, Ice::stringToIdentity("test"));
adapter->add(object, Ice::stringToIdentity("test"));
adapter->activate();
+
+ //
+ // Make a separate adapter with a servant locator. We use this to test
+ // that ::Ice::Context is correctly passed to checkedCast() operation.
+ //
+ communicator->getProperties()->setProperty("CheckedCastAdapter.Endpoints", "default -p 12346 -t 10000");
+ adapter = communicator->createObjectAdapter("CheckedCastAdapter");
+ Ice::ServantLocatorPtr checkedCastLocator = new CheckedCastLocator();
+ adapter->addServantLocator(checkedCastLocator, "");
+ adapter->activate();
+
communicator->waitForShutdown();
return EXIT_SUCCESS;
}