summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/proxy')
-rwxr-xr-xcpp/test/Ice/proxy/.depend.mak61
-rw-r--r--cpp/test/Ice/proxy/AllTests.cpp285
-rw-r--r--cpp/test/Ice/proxy/Client.cpp4
-rw-r--r--cpp/test/Ice/proxy/Collocated.cpp4
-rw-r--r--cpp/test/Ice/proxy/Makefile2
-rw-r--r--cpp/test/Ice/proxy/Makefile.mak2
-rw-r--r--cpp/test/Ice/proxy/Server.cpp2
-rw-r--r--cpp/test/Ice/proxy/ServerAMD.cpp2
-rw-r--r--cpp/test/Ice/proxy/TestAMDI.cpp40
-rw-r--r--cpp/test/Ice/proxy/TestAMDI.h26
-rw-r--r--cpp/test/Ice/proxy/TestI.cpp8
-rw-r--r--cpp/test/Ice/proxy/TestI.h9
12 files changed, 362 insertions, 83 deletions
diff --git a/cpp/test/Ice/proxy/.depend.mak b/cpp/test/Ice/proxy/.depend.mak
index 4b298f8f995..f38c3b9ccfe 100755
--- a/cpp/test/Ice/proxy/.depend.mak
+++ b/cpp/test/Ice/proxy/.depend.mak
@@ -29,6 +29,7 @@ Test.obj: \
"$(includedir)\IceUtil\Exception.h" \
"$(includedir)\Ice\ObjectF.h" \
"$(includedir)\Ice\Handle.h" \
+ "$(includedir)\Ice\ValueF.h" \
"$(includedir)\Ice\Exception.h" \
"$(includedir)\Ice\Format.h" \
"$(includedir)\Ice\StreamF.h" \
@@ -37,6 +38,7 @@ Test.obj: \
"$(includedir)\Ice\StreamHelpers.h" \
"$(includedir)\IceUtil\ScopedArray.h" \
"$(includedir)\IceUtil\Iterator.h" \
+ "$(includedir)\Ice\Traits.h" \
"$(includedir)\Ice\Proxy.h" \
"$(includedir)\IceUtil\Mutex.h" \
"$(includedir)\IceUtil\Lock.h" \
@@ -71,7 +73,7 @@ Test.obj: \
"$(includedir)\IceUtil\StringConverter.h" \
"$(includedir)\Ice\Object.h" \
"$(includedir)\Ice\IncomingAsyncF.h" \
- "$(includedir)\Ice\ObjectFactoryF.h" \
+ "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\ObjectFactoryManagerF.h" \
"$(includedir)\Ice\Buffer.h" \
"$(includedir)\Ice\Protocol.h" \
@@ -80,13 +82,13 @@ Test.obj: \
"$(includedir)\Ice\FactoryTable.h" \
"$(includedir)\Ice\GCObject.h" \
"$(includedir)\IceUtil\MutexPtrLock.h" \
+ "$(includedir)\Ice\Value.h" \
"$(includedir)\Ice\Incoming.h" \
"$(includedir)\Ice\ServantLocatorF.h" \
"$(includedir)\Ice\ServantManagerF.h" \
"$(includedir)\Ice\ResponseHandlerF.h" \
"$(includedir)\Ice\LocalException.h" \
"$(includedir)\Ice\BuiltinSequences.h" \
- "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\Outgoing.h" \
"$(includedir)\Ice\OutgoingAsync.h" \
"$(includedir)\IceUtil\Timer.h" \
@@ -109,6 +111,7 @@ Client.obj: \
"$(includedir)\IceUtil\Exception.h" \
"$(includedir)\Ice\ObjectF.h" \
"$(includedir)\Ice\Handle.h" \
+ "$(includedir)\Ice\ValueF.h" \
"$(includedir)\Ice\Exception.h" \
"$(includedir)\Ice\Format.h" \
"$(includedir)\Ice\StreamF.h" \
@@ -117,6 +120,7 @@ Client.obj: \
"$(includedir)\Ice\StreamHelpers.h" \
"$(includedir)\IceUtil\ScopedArray.h" \
"$(includedir)\IceUtil\Iterator.h" \
+ "$(includedir)\Ice\Traits.h" \
"$(includedir)\IceUtil\Optional.h" \
"$(includedir)\IceUtil\UndefSysMacros.h" \
"$(includedir)\IceUtil\PopDisableWarnings.h" \
@@ -157,7 +161,7 @@ Client.obj: \
"$(includedir)\Ice\BasicStream.h" \
"$(includedir)\Ice\Object.h" \
"$(includedir)\Ice\IncomingAsyncF.h" \
- "$(includedir)\Ice\ObjectFactoryF.h" \
+ "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\ObjectFactoryManagerF.h" \
"$(includedir)\Ice\Buffer.h" \
"$(includedir)\Ice\Protocol.h" \
@@ -171,6 +175,7 @@ Client.obj: \
"$(includedir)\Ice\PropertiesAdmin.h" \
"$(includedir)\Ice\GCObject.h" \
"$(includedir)\IceUtil\MutexPtrLock.h" \
+ "$(includedir)\Ice\Value.h" \
"$(includedir)\Ice\Incoming.h" \
"$(includedir)\Ice\ServantLocatorF.h" \
"$(includedir)\Ice\ServantManagerF.h" \
@@ -182,7 +187,6 @@ Client.obj: \
"$(includedir)\Ice\RemoteLogger.h" \
"$(includedir)\Ice\FactoryTableInit.h" \
"$(includedir)\Ice\DefaultObjectFactory.h" \
- "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\Communicator.h" \
"$(includedir)\Ice\RouterF.h" \
"$(includedir)\Ice\LocatorF.h" \
@@ -205,7 +209,6 @@ Client.obj: \
"$(includedir)\Ice\Stream.h" \
"$(includedir)\Ice\ImplicitContext.h" \
"$(includedir)\Ice\Locator.h" \
- "$(includedir)\Ice\ProcessF.h" \
"$(includedir)\Ice\Router.h" \
"$(includedir)\Ice\DispatchInterceptor.h" \
"$(includedir)\Ice\NativePropertiesAdmin.h" \
@@ -237,6 +240,7 @@ AllTests.obj: \
"$(includedir)\IceUtil\Exception.h" \
"$(includedir)\Ice\ObjectF.h" \
"$(includedir)\Ice\Handle.h" \
+ "$(includedir)\Ice\ValueF.h" \
"$(includedir)\Ice\Exception.h" \
"$(includedir)\Ice\Format.h" \
"$(includedir)\Ice\StreamF.h" \
@@ -245,6 +249,7 @@ AllTests.obj: \
"$(includedir)\Ice\StreamHelpers.h" \
"$(includedir)\IceUtil\ScopedArray.h" \
"$(includedir)\IceUtil\Iterator.h" \
+ "$(includedir)\Ice\Traits.h" \
"$(includedir)\IceUtil\Optional.h" \
"$(includedir)\IceUtil\UndefSysMacros.h" \
"$(includedir)\IceUtil\PopDisableWarnings.h" \
@@ -285,7 +290,7 @@ AllTests.obj: \
"$(includedir)\Ice\BasicStream.h" \
"$(includedir)\Ice\Object.h" \
"$(includedir)\Ice\IncomingAsyncF.h" \
- "$(includedir)\Ice\ObjectFactoryF.h" \
+ "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\ObjectFactoryManagerF.h" \
"$(includedir)\Ice\Buffer.h" \
"$(includedir)\Ice\Protocol.h" \
@@ -299,6 +304,7 @@ AllTests.obj: \
"$(includedir)\Ice\PropertiesAdmin.h" \
"$(includedir)\Ice\GCObject.h" \
"$(includedir)\IceUtil\MutexPtrLock.h" \
+ "$(includedir)\Ice\Value.h" \
"$(includedir)\Ice\Incoming.h" \
"$(includedir)\Ice\ServantLocatorF.h" \
"$(includedir)\Ice\ServantManagerF.h" \
@@ -310,7 +316,6 @@ AllTests.obj: \
"$(includedir)\Ice\RemoteLogger.h" \
"$(includedir)\Ice\FactoryTableInit.h" \
"$(includedir)\Ice\DefaultObjectFactory.h" \
- "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\Communicator.h" \
"$(includedir)\Ice\RouterF.h" \
"$(includedir)\Ice\LocatorF.h" \
@@ -333,7 +338,6 @@ AllTests.obj: \
"$(includedir)\Ice\Stream.h" \
"$(includedir)\Ice\ImplicitContext.h" \
"$(includedir)\Ice\Locator.h" \
- "$(includedir)\Ice\ProcessF.h" \
"$(includedir)\Ice\Router.h" \
"$(includedir)\Ice\DispatchInterceptor.h" \
"$(includedir)\Ice\NativePropertiesAdmin.h" \
@@ -365,6 +369,7 @@ TestI.obj: \
"$(includedir)\IceUtil\Exception.h" \
"$(includedir)\Ice\ObjectF.h" \
"$(includedir)\Ice\Handle.h" \
+ "$(includedir)\Ice\ValueF.h" \
"$(includedir)\Ice\Exception.h" \
"$(includedir)\Ice\Format.h" \
"$(includedir)\Ice\StreamF.h" \
@@ -373,6 +378,7 @@ TestI.obj: \
"$(includedir)\Ice\StreamHelpers.h" \
"$(includedir)\IceUtil\ScopedArray.h" \
"$(includedir)\IceUtil\Iterator.h" \
+ "$(includedir)\Ice\Traits.h" \
"$(includedir)\IceUtil\Optional.h" \
"$(includedir)\IceUtil\UndefSysMacros.h" \
"$(includedir)\IceUtil\PopDisableWarnings.h" \
@@ -413,7 +419,7 @@ TestI.obj: \
"$(includedir)\Ice\BasicStream.h" \
"$(includedir)\Ice\Object.h" \
"$(includedir)\Ice\IncomingAsyncF.h" \
- "$(includedir)\Ice\ObjectFactoryF.h" \
+ "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\ObjectFactoryManagerF.h" \
"$(includedir)\Ice\Buffer.h" \
"$(includedir)\Ice\Protocol.h" \
@@ -427,6 +433,7 @@ TestI.obj: \
"$(includedir)\Ice\PropertiesAdmin.h" \
"$(includedir)\Ice\GCObject.h" \
"$(includedir)\IceUtil\MutexPtrLock.h" \
+ "$(includedir)\Ice\Value.h" \
"$(includedir)\Ice\Incoming.h" \
"$(includedir)\Ice\ServantLocatorF.h" \
"$(includedir)\Ice\ServantManagerF.h" \
@@ -438,7 +445,6 @@ TestI.obj: \
"$(includedir)\Ice\RemoteLogger.h" \
"$(includedir)\Ice\FactoryTableInit.h" \
"$(includedir)\Ice\DefaultObjectFactory.h" \
- "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\Communicator.h" \
"$(includedir)\Ice\RouterF.h" \
"$(includedir)\Ice\LocatorF.h" \
@@ -461,7 +467,6 @@ TestI.obj: \
"$(includedir)\Ice\Stream.h" \
"$(includedir)\Ice\ImplicitContext.h" \
"$(includedir)\Ice\Locator.h" \
- "$(includedir)\Ice\ProcessF.h" \
"$(includedir)\Ice\Router.h" \
"$(includedir)\Ice\DispatchInterceptor.h" \
"$(includedir)\Ice\NativePropertiesAdmin.h" \
@@ -494,6 +499,7 @@ Server.obj: \
"$(includedir)\IceUtil\Exception.h" \
"$(includedir)\Ice\ObjectF.h" \
"$(includedir)\Ice\Handle.h" \
+ "$(includedir)\Ice\ValueF.h" \
"$(includedir)\Ice\Exception.h" \
"$(includedir)\Ice\Format.h" \
"$(includedir)\Ice\StreamF.h" \
@@ -502,6 +508,7 @@ Server.obj: \
"$(includedir)\Ice\StreamHelpers.h" \
"$(includedir)\IceUtil\ScopedArray.h" \
"$(includedir)\IceUtil\Iterator.h" \
+ "$(includedir)\Ice\Traits.h" \
"$(includedir)\IceUtil\Optional.h" \
"$(includedir)\IceUtil\UndefSysMacros.h" \
"$(includedir)\IceUtil\PopDisableWarnings.h" \
@@ -542,7 +549,7 @@ Server.obj: \
"$(includedir)\Ice\BasicStream.h" \
"$(includedir)\Ice\Object.h" \
"$(includedir)\Ice\IncomingAsyncF.h" \
- "$(includedir)\Ice\ObjectFactoryF.h" \
+ "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\ObjectFactoryManagerF.h" \
"$(includedir)\Ice\Buffer.h" \
"$(includedir)\Ice\Protocol.h" \
@@ -556,6 +563,7 @@ Server.obj: \
"$(includedir)\Ice\PropertiesAdmin.h" \
"$(includedir)\Ice\GCObject.h" \
"$(includedir)\IceUtil\MutexPtrLock.h" \
+ "$(includedir)\Ice\Value.h" \
"$(includedir)\Ice\Incoming.h" \
"$(includedir)\Ice\ServantLocatorF.h" \
"$(includedir)\Ice\ServantManagerF.h" \
@@ -567,7 +575,6 @@ Server.obj: \
"$(includedir)\Ice\RemoteLogger.h" \
"$(includedir)\Ice\FactoryTableInit.h" \
"$(includedir)\Ice\DefaultObjectFactory.h" \
- "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\Communicator.h" \
"$(includedir)\Ice\RouterF.h" \
"$(includedir)\Ice\LocatorF.h" \
@@ -590,7 +597,6 @@ Server.obj: \
"$(includedir)\Ice\Stream.h" \
"$(includedir)\Ice\ImplicitContext.h" \
"$(includedir)\Ice\Locator.h" \
- "$(includedir)\Ice\ProcessF.h" \
"$(includedir)\Ice\Router.h" \
"$(includedir)\Ice\DispatchInterceptor.h" \
"$(includedir)\Ice\NativePropertiesAdmin.h" \
@@ -621,6 +627,7 @@ TestAMD.obj: \
"$(includedir)\IceUtil\Exception.h" \
"$(includedir)\Ice\ObjectF.h" \
"$(includedir)\Ice\Handle.h" \
+ "$(includedir)\Ice\ValueF.h" \
"$(includedir)\Ice\Exception.h" \
"$(includedir)\Ice\Format.h" \
"$(includedir)\Ice\StreamF.h" \
@@ -629,6 +636,7 @@ TestAMD.obj: \
"$(includedir)\Ice\StreamHelpers.h" \
"$(includedir)\IceUtil\ScopedArray.h" \
"$(includedir)\IceUtil\Iterator.h" \
+ "$(includedir)\Ice\Traits.h" \
"$(includedir)\Ice\Proxy.h" \
"$(includedir)\IceUtil\Mutex.h" \
"$(includedir)\IceUtil\Lock.h" \
@@ -663,7 +671,7 @@ TestAMD.obj: \
"$(includedir)\IceUtil\StringConverter.h" \
"$(includedir)\Ice\Object.h" \
"$(includedir)\Ice\IncomingAsyncF.h" \
- "$(includedir)\Ice\ObjectFactoryF.h" \
+ "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\ObjectFactoryManagerF.h" \
"$(includedir)\Ice\Buffer.h" \
"$(includedir)\Ice\Protocol.h" \
@@ -672,6 +680,7 @@ TestAMD.obj: \
"$(includedir)\Ice\FactoryTable.h" \
"$(includedir)\Ice\GCObject.h" \
"$(includedir)\IceUtil\MutexPtrLock.h" \
+ "$(includedir)\Ice\Value.h" \
"$(includedir)\Ice\Incoming.h" \
"$(includedir)\Ice\ServantLocatorF.h" \
"$(includedir)\Ice\ServantManagerF.h" \
@@ -679,7 +688,6 @@ TestAMD.obj: \
"$(includedir)\Ice\IncomingAsync.h" \
"$(includedir)\Ice\LocalException.h" \
"$(includedir)\Ice\BuiltinSequences.h" \
- "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\Outgoing.h" \
"$(includedir)\Ice\OutgoingAsync.h" \
"$(includedir)\IceUtil\Timer.h" \
@@ -702,6 +710,7 @@ TestAMDI.obj: \
"$(includedir)\IceUtil\Exception.h" \
"$(includedir)\Ice\ObjectF.h" \
"$(includedir)\Ice\Handle.h" \
+ "$(includedir)\Ice\ValueF.h" \
"$(includedir)\Ice\Exception.h" \
"$(includedir)\Ice\Format.h" \
"$(includedir)\Ice\StreamF.h" \
@@ -710,6 +719,7 @@ TestAMDI.obj: \
"$(includedir)\Ice\StreamHelpers.h" \
"$(includedir)\IceUtil\ScopedArray.h" \
"$(includedir)\IceUtil\Iterator.h" \
+ "$(includedir)\Ice\Traits.h" \
"$(includedir)\IceUtil\Optional.h" \
"$(includedir)\IceUtil\UndefSysMacros.h" \
"$(includedir)\IceUtil\PopDisableWarnings.h" \
@@ -750,7 +760,7 @@ TestAMDI.obj: \
"$(includedir)\Ice\BasicStream.h" \
"$(includedir)\Ice\Object.h" \
"$(includedir)\Ice\IncomingAsyncF.h" \
- "$(includedir)\Ice\ObjectFactoryF.h" \
+ "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\ObjectFactoryManagerF.h" \
"$(includedir)\Ice\Buffer.h" \
"$(includedir)\Ice\Protocol.h" \
@@ -764,6 +774,7 @@ TestAMDI.obj: \
"$(includedir)\Ice\PropertiesAdmin.h" \
"$(includedir)\Ice\GCObject.h" \
"$(includedir)\IceUtil\MutexPtrLock.h" \
+ "$(includedir)\Ice\Value.h" \
"$(includedir)\Ice\Incoming.h" \
"$(includedir)\Ice\ServantLocatorF.h" \
"$(includedir)\Ice\ServantManagerF.h" \
@@ -775,7 +786,6 @@ TestAMDI.obj: \
"$(includedir)\Ice\RemoteLogger.h" \
"$(includedir)\Ice\FactoryTableInit.h" \
"$(includedir)\Ice\DefaultObjectFactory.h" \
- "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\Communicator.h" \
"$(includedir)\Ice\RouterF.h" \
"$(includedir)\Ice\LocatorF.h" \
@@ -798,7 +808,6 @@ TestAMDI.obj: \
"$(includedir)\Ice\Stream.h" \
"$(includedir)\Ice\ImplicitContext.h" \
"$(includedir)\Ice\Locator.h" \
- "$(includedir)\Ice\ProcessF.h" \
"$(includedir)\Ice\Router.h" \
"$(includedir)\Ice\DispatchInterceptor.h" \
"$(includedir)\Ice\NativePropertiesAdmin.h" \
@@ -831,6 +840,7 @@ ServerAMD.obj: \
"$(includedir)\IceUtil\Exception.h" \
"$(includedir)\Ice\ObjectF.h" \
"$(includedir)\Ice\Handle.h" \
+ "$(includedir)\Ice\ValueF.h" \
"$(includedir)\Ice\Exception.h" \
"$(includedir)\Ice\Format.h" \
"$(includedir)\Ice\StreamF.h" \
@@ -839,6 +849,7 @@ ServerAMD.obj: \
"$(includedir)\Ice\StreamHelpers.h" \
"$(includedir)\IceUtil\ScopedArray.h" \
"$(includedir)\IceUtil\Iterator.h" \
+ "$(includedir)\Ice\Traits.h" \
"$(includedir)\IceUtil\Optional.h" \
"$(includedir)\IceUtil\UndefSysMacros.h" \
"$(includedir)\IceUtil\PopDisableWarnings.h" \
@@ -879,7 +890,7 @@ ServerAMD.obj: \
"$(includedir)\Ice\BasicStream.h" \
"$(includedir)\Ice\Object.h" \
"$(includedir)\Ice\IncomingAsyncF.h" \
- "$(includedir)\Ice\ObjectFactoryF.h" \
+ "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\ObjectFactoryManagerF.h" \
"$(includedir)\Ice\Buffer.h" \
"$(includedir)\Ice\Protocol.h" \
@@ -893,6 +904,7 @@ ServerAMD.obj: \
"$(includedir)\Ice\PropertiesAdmin.h" \
"$(includedir)\Ice\GCObject.h" \
"$(includedir)\IceUtil\MutexPtrLock.h" \
+ "$(includedir)\Ice\Value.h" \
"$(includedir)\Ice\Incoming.h" \
"$(includedir)\Ice\ServantLocatorF.h" \
"$(includedir)\Ice\ServantManagerF.h" \
@@ -904,7 +916,6 @@ ServerAMD.obj: \
"$(includedir)\Ice\RemoteLogger.h" \
"$(includedir)\Ice\FactoryTableInit.h" \
"$(includedir)\Ice\DefaultObjectFactory.h" \
- "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\Communicator.h" \
"$(includedir)\Ice\RouterF.h" \
"$(includedir)\Ice\LocatorF.h" \
@@ -927,7 +938,6 @@ ServerAMD.obj: \
"$(includedir)\Ice\Stream.h" \
"$(includedir)\Ice\ImplicitContext.h" \
"$(includedir)\Ice\Locator.h" \
- "$(includedir)\Ice\ProcessF.h" \
"$(includedir)\Ice\Router.h" \
"$(includedir)\Ice\DispatchInterceptor.h" \
"$(includedir)\Ice\NativePropertiesAdmin.h" \
@@ -960,6 +970,7 @@ Collocated.obj: \
"$(includedir)\IceUtil\Exception.h" \
"$(includedir)\Ice\ObjectF.h" \
"$(includedir)\Ice\Handle.h" \
+ "$(includedir)\Ice\ValueF.h" \
"$(includedir)\Ice\Exception.h" \
"$(includedir)\Ice\Format.h" \
"$(includedir)\Ice\StreamF.h" \
@@ -968,6 +979,7 @@ Collocated.obj: \
"$(includedir)\Ice\StreamHelpers.h" \
"$(includedir)\IceUtil\ScopedArray.h" \
"$(includedir)\IceUtil\Iterator.h" \
+ "$(includedir)\Ice\Traits.h" \
"$(includedir)\IceUtil\Optional.h" \
"$(includedir)\IceUtil\UndefSysMacros.h" \
"$(includedir)\IceUtil\PopDisableWarnings.h" \
@@ -1008,7 +1020,7 @@ Collocated.obj: \
"$(includedir)\Ice\BasicStream.h" \
"$(includedir)\Ice\Object.h" \
"$(includedir)\Ice\IncomingAsyncF.h" \
- "$(includedir)\Ice\ObjectFactoryF.h" \
+ "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\ObjectFactoryManagerF.h" \
"$(includedir)\Ice\Buffer.h" \
"$(includedir)\Ice\Protocol.h" \
@@ -1022,6 +1034,7 @@ Collocated.obj: \
"$(includedir)\Ice\PropertiesAdmin.h" \
"$(includedir)\Ice\GCObject.h" \
"$(includedir)\IceUtil\MutexPtrLock.h" \
+ "$(includedir)\Ice\Value.h" \
"$(includedir)\Ice\Incoming.h" \
"$(includedir)\Ice\ServantLocatorF.h" \
"$(includedir)\Ice\ServantManagerF.h" \
@@ -1033,7 +1046,6 @@ Collocated.obj: \
"$(includedir)\Ice\RemoteLogger.h" \
"$(includedir)\Ice\FactoryTableInit.h" \
"$(includedir)\Ice\DefaultObjectFactory.h" \
- "$(includedir)\Ice\ObjectFactory.h" \
"$(includedir)\Ice\Communicator.h" \
"$(includedir)\Ice\RouterF.h" \
"$(includedir)\Ice\LocatorF.h" \
@@ -1056,7 +1068,6 @@ Collocated.obj: \
"$(includedir)\Ice\Stream.h" \
"$(includedir)\Ice\ImplicitContext.h" \
"$(includedir)\Ice\Locator.h" \
- "$(includedir)\Ice\ProcessF.h" \
"$(includedir)\Ice\Router.h" \
"$(includedir)\Ice\DispatchInterceptor.h" \
"$(includedir)\Ice\NativePropertiesAdmin.h" \
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp
index 545dc04037d..d324135ac83 100644
--- a/cpp/test/Ice/proxy/AllTests.cpp
+++ b/cpp/test/Ice/proxy/AllTests.cpp
@@ -10,20 +10,21 @@
#include <Ice/Ice.h>
#include <Ice/Locator.h>
#include <Ice/Router.h>
+#include <Ice/EndpointI.h>
#include <TestCommon.h>
#include <Test.h>
using namespace std;
-Test::MyClassPrx
+Test::MyClassPrxPtr
allTests(const Ice::CommunicatorPtr& communicator)
{
cout << "testing stringToProxy... " << flush;
string ref = "test:default -p 12010";
- Ice::ObjectPrx base = communicator->stringToProxy(ref);
+ Ice::ObjectPrxPtr base = communicator->stringToProxy(ref);
test(base);
- Ice::ObjectPrx b1 = communicator->stringToProxy("test");
+ Ice::ObjectPrxPtr b1 = communicator->stringToProxy("test");
test(b1->ice_getIdentity().name == "test" && b1->ice_getIdentity().category.empty() &&
b1->ice_getAdapterId().empty() && b1->ice_getFacet().empty());
b1 = communicator->stringToProxy("test ");
@@ -389,7 +390,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
b1 = b1->ice_invocationTimeout(1234);
Ice::EncodingVersion v = { 1, 0 };
b1 = b1->ice_encodingVersion(v);
- Ice::ObjectPrx router = communicator->stringToProxy("router");
+ Ice::ObjectPrxPtr router = communicator->stringToProxy("router");
router = router->ice_collocationOptimized(false);
router = router->ice_connectionCached(true);
router = router->ice_preferSecure(true);
@@ -397,7 +398,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
router = router->ice_locatorCacheTimeout(200);
router = router->ice_invocationTimeout(1500);
- Ice::ObjectPrx locator = communicator->stringToProxy("locator");
+ Ice::ObjectPrxPtr locator = communicator->stringToProxy("locator");
locator = locator->ice_collocationOptimized(true);
locator = locator->ice_connectionCached(false);
locator = locator->ice_preferSecure(true);
@@ -405,8 +406,8 @@ allTests(const Ice::CommunicatorPtr& communicator)
locator = locator->ice_locatorCacheTimeout(300);
locator = locator->ice_invocationTimeout(1500);
- locator = locator->ice_router(Ice::RouterPrx::uncheckedCast(router));
- b1 = b1->ice_locator(Ice::LocatorPrx::uncheckedCast(locator));
+ locator = locator->ice_router(ICE_UNCHECKED_CAST(Ice::RouterPrx, router));
+ b1 = b1->ice_locator(ICE_UNCHECKED_CAST(Ice::LocatorPrx, locator));
Ice::PropertyDict proxyProps = communicator->proxyToProperty(b1, "Test");
test(proxyProps.size() == 21);
@@ -548,12 +549,195 @@ allTests(const Ice::CommunicatorPtr& communicator)
cout << "testing proxy comparison... " << flush;
+#ifdef ICE_CPP11_MAPPING
+ test(Ice::targetEquals(communicator->stringToProxy("foo"), communicator->stringToProxy("foo")));
+ test(!Ice::targetEquals(communicator->stringToProxy("foo"), communicator->stringToProxy("foo2")));
+ test(Ice::targetLess(communicator->stringToProxy("foo"), communicator->stringToProxy("foo2")));
+ test(!Ice::targetLess(communicator->stringToProxy("foo2"), communicator->stringToProxy("foo")));
+
+ Ice::ObjectPrxPtr compObj = communicator->stringToProxy("foo");
+
+ test(Ice::targetEquals(compObj->ice_facet("facet"), compObj->ice_facet("facet")));
+ test(!Ice::targetEquals(compObj->ice_facet("facet"), compObj->ice_facet("facet1")));
+ test(Ice::targetLess(compObj->ice_facet("facet"), compObj->ice_facet("facet1")));
+ test(!Ice::targetLess(compObj->ice_facet("facet"), compObj->ice_facet("facet")));
+
+ test(Ice::targetEquals(compObj->ice_oneway(), compObj->ice_oneway()));
+ test(!Ice::targetEquals(compObj->ice_oneway(), compObj->ice_twoway()));
+ test(Ice::targetLess(compObj->ice_twoway(), compObj->ice_oneway()));
+ test(!Ice::targetLess(compObj->ice_oneway(), compObj->ice_twoway()));
+
+ test(Ice::targetEquals(compObj->ice_secure(true), compObj->ice_secure(true)));
+ test(!Ice::targetEquals(compObj->ice_secure(false), compObj->ice_secure(true)));
+ test(Ice::targetLess(compObj->ice_secure(false), compObj->ice_secure(true)));
+ test(!Ice::targetLess(compObj->ice_secure(true), compObj->ice_secure(false)));
+
+ test(Ice::targetEquals(compObj->ice_collocationOptimized(true), compObj->ice_collocationOptimized(true)));
+ test(!Ice::targetEquals(compObj->ice_collocationOptimized(false), compObj->ice_collocationOptimized(true)));
+ test(Ice::targetLess(compObj->ice_collocationOptimized(false), compObj->ice_collocationOptimized(true)));
+ test(!Ice::targetLess(compObj->ice_collocationOptimized(true), compObj->ice_collocationOptimized(false)));
+
+ test(Ice::targetEquals(compObj->ice_connectionCached(true), compObj->ice_connectionCached(true)));
+ test(!Ice::targetEquals(compObj->ice_connectionCached(false), compObj->ice_connectionCached(true)));
+ test(Ice::targetLess(compObj->ice_connectionCached(false), compObj->ice_connectionCached(true)));
+ test(!Ice::targetLess(compObj->ice_connectionCached(true), compObj->ice_connectionCached(false)));
+
+ test(Ice::targetEquals(compObj->ice_endpointSelection(Ice::Random), compObj->ice_endpointSelection(Ice::Random)));
+ test(!Ice::targetEquals(compObj->ice_endpointSelection(Ice::Random), compObj->ice_endpointSelection(Ice::Ordered)));
+ test(Ice::targetLess(compObj->ice_endpointSelection(Ice::Random), compObj->ice_endpointSelection(Ice::Ordered)));
+ test(!Ice::targetLess(compObj->ice_endpointSelection(Ice::Ordered), compObj->ice_endpointSelection(Ice::Random)));
+
+ test(Ice::targetEquals(compObj->ice_connectionId("id2"), compObj->ice_connectionId("id2")));
+ test(!Ice::targetEquals(compObj->ice_connectionId("id1"), compObj->ice_connectionId("id2")));
+ test(Ice::targetLess(compObj->ice_connectionId("id1"), compObj->ice_connectionId("id2")));
+ test(!Ice::targetLess(compObj->ice_connectionId("id2"), compObj->ice_connectionId("id1")));
+
+ test(compObj->ice_connectionId("id1")->ice_getConnectionId() == "id1");
+ test(compObj->ice_connectionId("id2")->ice_getConnectionId() == "id2");
+
+ test(Ice::targetEquals(compObj->ice_compress(true), compObj->ice_compress(true)));
+ test(!Ice::targetEquals(compObj->ice_compress(false), compObj->ice_compress(true)));
+ test(Ice::targetLess(compObj->ice_compress(false), compObj->ice_compress(true)));
+ test(!Ice::targetLess(compObj->ice_compress(true), compObj->ice_compress(false)));
+
+ test(Ice::targetEquals(compObj->ice_timeout(20), compObj->ice_timeout(20)));
+ test(!Ice::targetEquals(compObj->ice_timeout(10), compObj->ice_timeout(20)));
+ test(Ice::targetLess(compObj->ice_timeout(10), compObj->ice_timeout(20)));
+ test(!Ice::targetLess(compObj->ice_timeout(20), compObj->ice_timeout(10)));
+
+ auto loc1 = Ice::uncheckedCast<Ice::LocatorPrx>(communicator->stringToProxy("loc1:default -p 10000"));
+ auto loc2 = Ice::uncheckedCast<Ice::LocatorPrx>(communicator->stringToProxy("loc2:default -p 10000"));
+
+ test(Ice::targetEquals(compObj->ice_locator(0), compObj->ice_locator(0)));
+ test(Ice::targetEquals(compObj->ice_locator(loc1), compObj->ice_locator(loc1)));
+ test(!Ice::targetEquals(compObj->ice_locator(loc1), compObj->ice_locator(0)));
+ test(!Ice::targetEquals(compObj->ice_locator(0), compObj->ice_locator(loc2)));
+ test(!Ice::targetEquals(compObj->ice_locator(loc1), compObj->ice_locator(loc2)));
+ test(Ice::targetLess(compObj->ice_locator(0), compObj->ice_locator(loc1)));
+ test(!Ice::targetLess(compObj->ice_locator(loc1), compObj->ice_locator(0)));
+ test(Ice::targetLess(compObj->ice_locator(loc1), compObj->ice_locator(loc2)));
+ test(!Ice::targetLess(compObj->ice_locator(loc2), compObj->ice_locator(loc1)));
+
+ auto rtr1 = Ice::uncheckedCast<Ice::RouterPrx>(communicator->stringToProxy("rtr1:default -p 10000"));
+ auto rtr2 = Ice::uncheckedCast<Ice::RouterPrx>(communicator->stringToProxy("rtr2:default -p 10000"));
+
+ test(Ice::targetEquals(compObj->ice_router(0), compObj->ice_router(0)));
+ test(Ice::targetEquals(compObj->ice_router(rtr1), compObj->ice_router(rtr1)));
+ test(!Ice::targetEquals(compObj->ice_router(rtr1), compObj->ice_router(0)));
+ test(!Ice::targetEquals(compObj->ice_router(0), compObj->ice_router(rtr2)));
+ test(!Ice::targetEquals(compObj->ice_router(rtr1), compObj->ice_router(rtr2)));
+ test(Ice::targetLess(compObj->ice_router(0), compObj->ice_router(rtr1)));
+ test(!Ice::targetLess(compObj->ice_router(rtr1), compObj->ice_router(0)));
+ test(Ice::targetLess(compObj->ice_router(rtr1), compObj->ice_router(rtr2)));
+ test(!Ice::targetLess(compObj->ice_router(rtr2), compObj->ice_router(rtr1)));
+
+ Ice::Context ctx1;
+ ctx1["ctx1"] = "v1";
+ Ice::Context ctx2;
+ ctx2["ctx2"] = "v2";
+ test(Ice::targetEquals(compObj->ice_context(Ice::Context()), compObj->ice_context(Ice::Context())));
+ test(Ice::targetEquals(compObj->ice_context(ctx1), compObj->ice_context(ctx1)));
+ test(!Ice::targetEquals(compObj->ice_context(ctx1), compObj->ice_context(Ice::Context())));
+ test(!Ice::targetEquals(compObj->ice_context(Ice::Context()), compObj->ice_context(ctx2)));
+ test(!Ice::targetEquals(compObj->ice_context(ctx1), compObj->ice_context(ctx2)));
+ test(Ice::targetLess(compObj->ice_context(ctx1), compObj->ice_context(ctx2)));
+ test(!Ice::targetLess(compObj->ice_context(ctx2), compObj->ice_context(ctx1)));
+
+ test(Ice::targetEquals(compObj->ice_preferSecure(true), compObj->ice_preferSecure(true)));
+ test(!Ice::targetEquals(compObj->ice_preferSecure(true), compObj->ice_preferSecure(false)));
+ test(Ice::targetLess(compObj->ice_preferSecure(false), compObj->ice_preferSecure(true)));
+ test(!Ice::targetLess(compObj->ice_preferSecure(true), compObj->ice_preferSecure(false)));
+
+ auto compObj1 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10000");
+ auto compObj2 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10001");
+ test(!Ice::targetEquals(compObj1, compObj2));
+ test(Ice::targetLess(compObj1, compObj2));
+ test(!Ice::targetLess(compObj2, compObj1));
+
+ compObj1 = communicator->stringToProxy("foo@MyAdapter1");
+ compObj2 = communicator->stringToProxy("foo@MyAdapter2");
+ test(!Ice::targetEquals(compObj1, compObj2));
+ test(Ice::targetLess(compObj1, compObj2));
+ test(!Ice::targetLess(compObj2, compObj1));
+
+ test(Ice::targetEquals(compObj1->ice_locatorCacheTimeout(20), compObj1->ice_locatorCacheTimeout(20)));
+ test(!Ice::targetEquals(compObj1->ice_locatorCacheTimeout(10), compObj1->ice_locatorCacheTimeout(20)));
+ test(Ice::targetLess(compObj1->ice_locatorCacheTimeout(10), compObj1->ice_locatorCacheTimeout(20)));
+ test(!Ice::targetLess(compObj1->ice_locatorCacheTimeout(20), compObj1->ice_locatorCacheTimeout(10)));
+
+ test(Ice::targetEquals(compObj1->ice_invocationTimeout(20), compObj1->ice_invocationTimeout(20)));
+ test(!Ice::targetEquals(compObj1->ice_invocationTimeout(10), compObj1->ice_invocationTimeout(20)));
+ test(Ice::targetLess(compObj1->ice_invocationTimeout(10), compObj1->ice_invocationTimeout(20)));
+ test(!Ice::targetLess(compObj1->ice_invocationTimeout(20), compObj1->ice_invocationTimeout(10)));
+
+ compObj1 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 1000");
+ compObj2 = communicator->stringToProxy("foo@MyAdapter1");
+ test(!Ice::targetEquals(compObj1, compObj2));
+ test(Ice::targetLess(compObj1, compObj2));
+ test(!Ice::targetLess(compObj2, compObj1));
+
+ Ice::EndpointSeq endpts1 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10000")->ice_getEndpoints();
+ Ice::EndpointSeq endpts2 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10001")->ice_getEndpoints();
+
+ auto eq = [](const shared_ptr<Ice::Endpoint>& lhs, const shared_ptr<Ice::Endpoint>& rhs)
+ {
+ return Ice::targetEquals(dynamic_pointer_cast<IceInternal::EndpointI>(lhs),
+ dynamic_pointer_cast<IceInternal::EndpointI>(rhs));
+ };
+
+ auto less = [](const shared_ptr<Ice::Endpoint>& lhs, const shared_ptr<Ice::Endpoint>& rhs)
+ {
+ return Ice::targetLess(dynamic_pointer_cast<IceInternal::EndpointI>(lhs),
+ dynamic_pointer_cast<IceInternal::EndpointI>(rhs));
+ };
+
+ test(!equal(endpts1.begin(), endpts1.end(), endpts2.begin(), endpts2.end(), eq));
+ test(lexicographical_compare(endpts1.begin(), endpts1.end(), endpts2.begin(), endpts2.end(), less));
+ test(!lexicographical_compare(endpts2.begin(), endpts2.end(), endpts1.begin(), endpts1.end(), less));
+
+ Ice::EndpointSeq endpts3 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10000")->ice_getEndpoints();
+ test(equal(endpts1.begin(), endpts1.end(), endpts3.begin(), endpts3.end(), eq));
+
+ test(Ice::targetEquals(compObj1->ice_encodingVersion(Ice::Encoding_1_0), compObj1->ice_encodingVersion(Ice::Encoding_1_0)));
+ test(!Ice::targetEquals(compObj1->ice_encodingVersion(Ice::Encoding_1_0), compObj1->ice_encodingVersion(Ice::Encoding_1_1)));
+ test(Ice::targetLess(compObj->ice_encodingVersion(Ice::Encoding_1_0), compObj->ice_encodingVersion(Ice::Encoding_1_1)));
+ test(!Ice::targetLess(compObj->ice_encodingVersion(Ice::Encoding_1_1), compObj->ice_encodingVersion(Ice::Encoding_1_0)));
+
+ //
+ // TODO: Ideally we should also test comparison of fixed proxies.
+ //
+
+ cout << "ok" << endl;
+
+ cout << "testing checked cast... " << flush;
+ auto cl = Ice::checkedCast<Test::MyClassPrx>(base);
+ test(cl);
+
+ auto derived = Ice::checkedCast<Test::MyDerivedClassPrx>(cl);
+ test(derived);
+ test(Ice::targetEquals(cl, base));
+ test(Ice::targetEquals(derived, base));
+ test(Ice::targetEquals(cl, derived));
+
+ auto loc = Ice::checkedCast<Ice::LocatorPrx>(base);
+ test(loc == nullptr);
+
+ //
+ // Upcasting
+ //
+ auto cl2 = Ice::checkedCast<Test::MyClassPrx>(derived);
+ auto obj = Ice::checkedCast<Ice::ObjectPrx>(derived);
+ test(cl2);
+ test(obj);
+ test(Ice::targetEquals(cl2, obj));
+ test(Ice::targetEquals(cl2, derived));
+#else
test(communicator->stringToProxy("foo") == communicator->stringToProxy("foo"));
test(communicator->stringToProxy("foo") != communicator->stringToProxy("foo2"));
test(communicator->stringToProxy("foo") < communicator->stringToProxy("foo2"));
test(!(communicator->stringToProxy("foo2") < communicator->stringToProxy("foo")));
- Ice::ObjectPrx compObj = communicator->stringToProxy("foo");
+ Ice::ObjectPrxPtr compObj = communicator->stringToProxy("foo");
test(compObj->ice_facet("facet") == compObj->ice_facet("facet"));
test(compObj->ice_facet("facet") != compObj->ice_facet("facet1"));
@@ -603,8 +787,8 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(compObj->ice_timeout(10) < compObj->ice_timeout(20));
test(!(compObj->ice_timeout(20) < compObj->ice_timeout(10)));
- Ice::LocatorPrx loc1 = Ice::LocatorPrx::uncheckedCast(communicator->stringToProxy("loc1:default -p 10000"));
- Ice::LocatorPrx loc2 = Ice::LocatorPrx::uncheckedCast(communicator->stringToProxy("loc2:default -p 10000"));
+ Ice::LocatorPrxPtr loc1 = ICE_UNCHECKED_CAST(Ice::LocatorPrx, communicator->stringToProxy("loc1:default -p 10000"));
+ Ice::LocatorPrxPtr loc2 = ICE_UNCHECKED_CAST(Ice::LocatorPrx, communicator->stringToProxy("loc2:default -p 10000"));
test(compObj->ice_locator(0) == compObj->ice_locator(0));
test(compObj->ice_locator(loc1) == compObj->ice_locator(loc1));
test(compObj->ice_locator(loc1) != compObj->ice_locator(0));
@@ -615,8 +799,8 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(compObj->ice_locator(loc1) < compObj->ice_locator(loc2));
test(!(compObj->ice_locator(loc2) < compObj->ice_locator(loc1)));
- Ice::RouterPrx rtr1 = Ice::RouterPrx::uncheckedCast(communicator->stringToProxy("rtr1:default -p 10000"));
- Ice::RouterPrx rtr2 = Ice::RouterPrx::uncheckedCast(communicator->stringToProxy("rtr2:default -p 10000"));
+ Ice::RouterPrxPtr rtr1 = ICE_UNCHECKED_CAST(Ice::RouterPrx, communicator->stringToProxy("rtr1:default -p 10000"));
+ Ice::RouterPrxPtr rtr2 = ICE_UNCHECKED_CAST(Ice::RouterPrx, communicator->stringToProxy("rtr2:default -p 10000"));
test(compObj->ice_router(0) == compObj->ice_router(0));
test(compObj->ice_router(rtr1) == compObj->ice_router(rtr1));
test(compObj->ice_router(rtr1) != compObj->ice_router(0));
@@ -644,8 +828,8 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(compObj->ice_preferSecure(false) < compObj->ice_preferSecure(true));
test(!(compObj->ice_preferSecure(true) < compObj->ice_preferSecure(false)));
- Ice::ObjectPrx compObj1 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10000");
- Ice::ObjectPrx compObj2 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10001");
+ Ice::ObjectPrxPtr compObj1 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10000");
+ Ice::ObjectPrxPtr compObj2 = communicator->stringToProxy("foo:tcp -h 127.0.0.1 -p 10001");
test(compObj1 != compObj2);
test(compObj1 < compObj2);
test(!(compObj2 < compObj1));
@@ -691,23 +875,23 @@ allTests(const Ice::CommunicatorPtr& communicator)
cout << "ok" << endl;
cout << "testing checked cast... " << flush;
- Test::MyClassPrx cl = Test::MyClassPrx::checkedCast(base);
+ Test::MyClassPrxPtr cl = ICE_CHECKED_CAST(Test::MyClassPrx, base);
test(cl);
- Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(cl);
+ Test::MyDerivedClassPrxPtr derived = ICE_CHECKED_CAST(Test::MyDerivedClassPrx, cl);
test(derived);
test(cl == base);
test(derived == base);
test(cl == derived);
- Ice::LocatorPrx loc = Ice::LocatorPrx::checkedCast(base);
+ Ice::LocatorPrxPtr loc = ICE_CHECKED_CAST(Ice::LocatorPrx, base);
test(loc == 0);
//
// Upcasting
//
- Test::MyClassPrx cl2 = Test::MyClassPrx::checkedCast(derived);
- Ice::ObjectPrx obj = Ice::ObjectPrx::checkedCast(derived);
+ Test::MyClassPrxPtr cl2 = ICE_CHECKED_CAST(Test::MyClassPrx, derived);
+ Ice::ObjectPrxPtr obj = ICE_CHECKED_CAST(Ice::ObjectPrx, derived);
test(cl2);
test(obj);
test(cl2 == obj);
@@ -733,7 +917,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(obj);
test(cl2 == obj);
test(cl2 == derived);
-
+#endif
cout << "ok" << endl;
cout << "testing checked cast with context... " << flush;
@@ -742,13 +926,18 @@ allTests(const Ice::CommunicatorPtr& communicator)
c["one"] = "hello";
c["two"] = "world";
+#ifdef ICE_CPP11_MAPPING
+ cl = Ice::checkedCast<Test::MyClassPrx>(base, c);
+#else
cl = Test::MyClassPrx::checkedCast(base, c);
+#endif
Ice::Context c2 = cl->getContext();
test(c == c2);
//
// Now with alternate API
//
+#ifndef ICE_CPP11_MAPPING
cl = checkedCast<Test::MyClassPrx>(base);
c = cl->getContext();
test(c.size() == 0);
@@ -756,12 +945,12 @@ allTests(const Ice::CommunicatorPtr& communicator)
cl = checkedCast<Test::MyClassPrx>(base, c);
c2 = cl->getContext();
test(c == c2);
-
+#endif
cout << "ok" << endl;
cout << "testing encoding versioning... " << flush;
string ref20 = "test -e 2.0:default -p 12010";
- Test::MyClassPrx cl20 = Test::MyClassPrx::uncheckedCast(communicator->stringToProxy(ref20));
+ Test::MyClassPrxPtr cl20 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref20));
try
{
cl20->ice_ping();
@@ -773,7 +962,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
string ref10 = "test -e 1.0:default -p 12010";
- Test::MyClassPrx cl10 = Test::MyClassPrx::uncheckedCast(communicator->stringToProxy(ref10));
+ Test::MyClassPrxPtr cl10 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref10));
cl10->ice_ping();
cl10->ice_encodingVersion(Ice::Encoding_1_0)->ice_ping();
cl->ice_encodingVersion(Ice::Encoding_1_0)->ice_ping();
@@ -781,10 +970,18 @@ allTests(const Ice::CommunicatorPtr& communicator)
// 1.3 isn't supported but since a 1.3 proxy supports 1.1, the
// call will use the 1.1 encoding
string ref13 = "test -e 1.3:default -p 12010";
- Test::MyClassPrx cl13 = Test::MyClassPrx::uncheckedCast(communicator->stringToProxy(ref13));
+ Test::MyClassPrxPtr cl13 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref13));
cl13->ice_ping();
+#ifdef ICE_CPP11_MAPPING
+ cl13->ice_ping_async().get();
+#else
cl13->end_ice_ping(cl13->begin_ice_ping());
+#endif
+#ifndef ICE_CPP11_MAPPING
+ //
+ // TODO port this once the C++11 streaming API is done
+ //
try
{
// Send request with bogus 1.2 encoding.
@@ -826,13 +1023,14 @@ allTests(const Ice::CommunicatorPtr& communicator)
// The server thrown an UnsupportedEncodingException
test(ex.unknown.find("UnsupportedEncodingException") != string::npos);
}
+#endif
cout << "ok" << endl;
cout << "testing protocol versioning... " << flush;
ref20 = "test -p 2.0:default -p 12010";
- cl20 = Test::MyClassPrx::uncheckedCast(communicator->stringToProxy(ref20));
+ cl20 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref20));
try
{
cl20->ice_ping();
@@ -844,16 +1042,19 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
ref10 = "test -p 1.0:default -p 12010";
- cl10 = Test::MyClassPrx::uncheckedCast(communicator->stringToProxy(ref10));
+ cl10 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref10));
cl10->ice_ping();
// 1.3 isn't supported but since a 1.3 proxy supports 1.0, the
// call will use the 1.0 encoding
ref13 = "test -p 1.3:default -p 12010";
- cl13 = Test::MyClassPrx::uncheckedCast(communicator->stringToProxy(ref13));
+ cl13 = ICE_UNCHECKED_CAST(Test::MyClassPrx, communicator->stringToProxy(ref13));
cl13->ice_ping();
+#ifdef ICE_CPP11_MAPPING
+ cl13->ice_ping_async().get();
+#else
cl13->end_ice_ping(cl13->begin_ice_ping());
-
+#endif
cout << "ok" <<endl;
cout << "testing opaque endpoints... " << flush;
@@ -861,7 +1062,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// Invalid -x option
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque -t 99 -v abc -x abc");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque -t 99 -v abc -x abc");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -871,7 +1072,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// Missing -t and -v
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -881,7 +1082,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// Repeated -t
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque -t 1 -t 1 -v abc");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque -t 1 -t 1 -v abc");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -891,7 +1092,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// Repeated -v
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque -t 1 -v abc -v abc");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque -t 1 -v abc -v abc");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -901,7 +1102,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// Missing -t
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque -v abc");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque -v abc");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -911,7 +1112,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// Missing -v
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque -t 1");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque -t 1");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -921,7 +1122,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// Missing arg for -t
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque -t -v abc");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque -t -v abc");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -931,7 +1132,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// Missing arg for -v
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque -t 1 -v");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque -t 1 -v");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -941,7 +1142,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// Not a number for -t
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque -t x -v abc");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque -t x -v abc");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -951,7 +1152,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// < 0 for -t
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque -t -1 -v abc");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque -t -1 -v abc");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -961,7 +1162,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
try
{
// Invalid char for -v
- Ice::ObjectPrx p = communicator->stringToProxy("id:opaque -t 99 -v x?c");
+ Ice::ObjectPrxPtr p = communicator->stringToProxy("id:opaque -t 99 -v x?c");
test(false);
}
catch(const Ice::EndpointParseException&)
@@ -969,12 +1170,12 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
// Legal TCP endpoint expressed as opaque endpoint
- Ice::ObjectPrx p1 = communicator->stringToProxy("test -e 1.1:opaque -e 1.0 -t 1 -v CTEyNy4wLjAuMeouAAAQJwAAAA==");
+ Ice::ObjectPrxPtr p1 = communicator->stringToProxy("test -e 1.1:opaque -e 1.0 -t 1 -v CTEyNy4wLjAuMeouAAAQJwAAAA==");
string pstr = communicator->proxyToString(p1);
test(pstr == "test -t -e 1.1:tcp -h 127.0.0.1 -p 12010 -t 10000");
// Opaque endpoint encoded with 1.1 encoding.
- Ice::ObjectPrx p2 = communicator->stringToProxy("test -e 1.1:opaque -e 1.1 -t 1 -v CTEyNy4wLjAuMeouAAAQJwAAAA==");
+ Ice::ObjectPrxPtr p2 = communicator->stringToProxy("test -e 1.1:opaque -e 1.1 -t 1 -v CTEyNy4wLjAuMeouAAAQJwAAAA==");
test(communicator->proxyToString(p2) == "test -t -e 1.1:tcp -h 127.0.0.1 -p 12010 -t 10000");
if(communicator->getProperties()->getPropertyAsInt("Ice.IPv6") == 0 &&
@@ -1043,7 +1244,7 @@ allTests(const Ice::CommunicatorPtr& communicator)
// sent over the wire and returned by the server without losing
// the opaque endpoints.
//
- Ice::ObjectPrx p2 = derived->echo(p1);
+ Ice::ObjectPrxPtr p2 = derived->echo(p1);
pstr = communicator->proxyToString(p2);
if(ssl)
{
diff --git a/cpp/test/Ice/proxy/Client.cpp b/cpp/test/Ice/proxy/Client.cpp
index 6eed51d0287..b436481d8ac 100644
--- a/cpp/test/Ice/proxy/Client.cpp
+++ b/cpp/test/Ice/proxy/Client.cpp
@@ -18,8 +18,8 @@ using namespace std;
int
run(int, char**, const Ice::CommunicatorPtr& communicator, const Ice::InitializationData&)
{
- Test::MyClassPrx allTests(const Ice::CommunicatorPtr&);
- Test::MyClassPrx myClass = allTests(communicator);
+ Test::MyClassPrxPtr allTests(const Ice::CommunicatorPtr&);
+ Test::MyClassPrxPtr myClass = allTests(communicator);
myClass->shutdown();
diff --git a/cpp/test/Ice/proxy/Collocated.cpp b/cpp/test/Ice/proxy/Collocated.cpp
index 6c008378319..3612987454d 100644
--- a/cpp/test/Ice/proxy/Collocated.cpp
+++ b/cpp/test/Ice/proxy/Collocated.cpp
@@ -21,10 +21,10 @@ run(int, char**, const Ice::CommunicatorPtr& communicator,
{
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- adapter->add(new MyDerivedClassI, communicator->stringToIdentity("test"));
+ adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test"));
//adapter->activate(); // Don't activate OA to ensure collocation is used.
- Test::MyClassPrx allTests(const Ice::CommunicatorPtr&);
+ Test::MyClassPrxPtr allTests(const Ice::CommunicatorPtr&);
allTests(communicator);
return EXIT_SUCCESS;
diff --git a/cpp/test/Ice/proxy/Makefile b/cpp/test/Ice/proxy/Makefile
index fd028031a2f..803fb4d002d 100644
--- a/cpp/test/Ice/proxy/Makefile
+++ b/cpp/test/Ice/proxy/Makefile
@@ -49,7 +49,7 @@ GENPIC = no
include $(top_srcdir)/config/Make.rules
-CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+CPPFLAGS := -I. -I../../include -I../../../src $(CPPFLAGS)
$(CLIENT): $(COBJS)
rm -f $@
diff --git a/cpp/test/Ice/proxy/Makefile.mak b/cpp/test/Ice/proxy/Makefile.mak
index c08163168a4..55b8cc66b0f 100644
--- a/cpp/test/Ice/proxy/Makefile.mak
+++ b/cpp/test/Ice/proxy/Makefile.mak
@@ -52,7 +52,7 @@ OBJS = $(COBJS) \
!include $(top_srcdir)/config/Make.rules.mak
-CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+CPPFLAGS = -I. -I../../include -I../../../src $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
!if "$(GENERATE_PDB)" == "yes"
CPDBFLAGS = /pdb:$(CLIENT).pdb
diff --git a/cpp/test/Ice/proxy/Server.cpp b/cpp/test/Ice/proxy/Server.cpp
index 10195276471..f9b26da3b59 100644
--- a/cpp/test/Ice/proxy/Server.cpp
+++ b/cpp/test/Ice/proxy/Server.cpp
@@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator)
{
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- adapter->add(new MyDerivedClassI, communicator->stringToIdentity("test"));
+ adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test"));
adapter->activate();
TEST_READY
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/proxy/ServerAMD.cpp b/cpp/test/Ice/proxy/ServerAMD.cpp
index f0f85af4b9f..a27b9df15ac 100644
--- a/cpp/test/Ice/proxy/ServerAMD.cpp
+++ b/cpp/test/Ice/proxy/ServerAMD.cpp
@@ -20,7 +20,7 @@ run(int, char**, const Ice::CommunicatorPtr& communicator)
{
communicator->getProperties()->setProperty("TestAdapter.Endpoints", "default -p 12010:udp");
Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapter("TestAdapter");
- adapter->add(new MyDerivedClassI, communicator->stringToIdentity("test"));
+ adapter->add(ICE_MAKE_SHARED(MyDerivedClassI), communicator->stringToIdentity("test"));
adapter->activate();
TEST_READY
communicator->waitForShutdown();
diff --git a/cpp/test/Ice/proxy/TestAMDI.cpp b/cpp/test/Ice/proxy/TestAMDI.cpp
index 401f276292c..54098ebd7ae 100644
--- a/cpp/test/Ice/proxy/TestAMDI.cpp
+++ b/cpp/test/Ice/proxy/TestAMDI.cpp
@@ -11,10 +11,42 @@
#include <TestAMDI.h>
#include <TestCommon.h>
+using namespace std;
+
MyDerivedClassI::MyDerivedClassI()
{
}
+#ifdef ICE_CPP11_MAPPING
+void
+MyDerivedClassI::echo_async(
+ const shared_ptr<Ice::ObjectPrx>& obj,
+ function<void (const shared_ptr<Ice::ObjectPrx>&)> response,
+ function<void (const exception_ptr&)>,
+ const Ice::Current&)
+{
+ response(obj);
+}
+
+void
+MyDerivedClassI::shutdown_async(
+ function<void ()> response,
+ function<void (const exception_ptr&)>,
+ const Ice::Current& current)
+{
+ current.adapter->getCommunicator()->shutdown();
+ response();
+}
+
+void
+MyDerivedClassI::getContext_async(
+ function<void (const Ice::Context&)> response,
+ function<void (const exception_ptr&)>,
+ const Ice::Current&)
+{
+ response(_ctx);
+}
+#else
void
MyDerivedClassI::echo_async(const Test::AMD_MyDerivedClass_echoPtr& cb, const Ice::ObjectPrx& obj, const Ice::Current&)
{
@@ -33,10 +65,14 @@ MyDerivedClassI::getContext_async(const Test::AMD_MyClass_getContextPtr& cb, con
{
cb->ice_response(_ctx);
}
-
+#endif
bool
-MyDerivedClassI::ice_isA(const std::string& s, const Ice::Current& current) const
+MyDerivedClassI::ice_isA(const string& s, const Ice::Current& current) const
{
_ctx = current.ctx;
+#ifdef ICE_CPP11_MAPPING
+ return Test::MyDerivedClassDisp::ice_isA(s, current);
+#else
return Test::MyDerivedClass::ice_isA(s, current);
+#endif
}
diff --git a/cpp/test/Ice/proxy/TestAMDI.h b/cpp/test/Ice/proxy/TestAMDI.h
index b25a0b1dd29..b3400f4f83d 100644
--- a/cpp/test/Ice/proxy/TestAMDI.h
+++ b/cpp/test/Ice/proxy/TestAMDI.h
@@ -12,19 +12,41 @@
#include <TestAMD.h>
-class MyDerivedClassI : public Test::MyDerivedClass
+class MyDerivedClassI :
+#ifdef ICE_CPP11_MAPPING
+ public Test::MyDerivedClassDisp
+#else
+ public Test::MyDerivedClass
+#endif
{
public:
MyDerivedClassI();
+#ifdef ICE_CPP11_MAPPING
+ virtual void echo_async(
+ const std::shared_ptr<Ice::ObjectPrx>&,
+ ::std::function<void (const ::std::shared_ptr<Ice::ObjectPrx>&)>,
+ ::std::function<void (const ::std::exception_ptr&)>,
+ const Ice::Current&);
+
+ virtual void shutdown_async(
+ ::std::function<void ()>,
+ ::std::function<void (const ::std::exception_ptr&)>,
+ const Ice::Current&);
+
+ virtual void getContext_async(
+ ::std::function<void (const Ice::Context&)>,
+ ::std::function<void (const ::std::exception_ptr&)>,
+ const Ice::Current&);
+#else
virtual void echo_async(const Test::AMD_MyDerivedClass_echoPtr&, const Ice::ObjectPrx&, const Ice::Current&);
virtual void shutdown_async(const Test::AMD_MyClass_shutdownPtr&,
const Ice::Current&);
virtual void getContext_async(const Test::AMD_MyClass_getContextPtr& cb,
const Ice::Current&);
+#endif
virtual bool ice_isA(const std::string&, const Ice::Current&) const;
-
private:
mutable Ice::Context _ctx;
diff --git a/cpp/test/Ice/proxy/TestI.cpp b/cpp/test/Ice/proxy/TestI.cpp
index e8412bbac8c..7ffde953fad 100644
--- a/cpp/test/Ice/proxy/TestI.cpp
+++ b/cpp/test/Ice/proxy/TestI.cpp
@@ -17,8 +17,8 @@ MyDerivedClassI::MyDerivedClassI()
{
}
-Ice::ObjectPrx
-MyDerivedClassI::echo(const Ice::ObjectPrx& obj, const Ice::Current&)
+Ice::ObjectPrxPtr
+MyDerivedClassI::echo(const Ice::ObjectPrxPtr& obj, const Ice::Current&)
{
return obj;
}
@@ -39,5 +39,9 @@ bool
MyDerivedClassI::ice_isA(const std::string& s, const Ice::Current& current) const
{
_ctx = current.ctx;
+#ifdef ICE_CPP11_MAPPING
+ return Test::MyDerivedClassDisp::ice_isA(s, current);
+#else
return Test::MyDerivedClass::ice_isA(s, current);
+#endif
}
diff --git a/cpp/test/Ice/proxy/TestI.h b/cpp/test/Ice/proxy/TestI.h
index 9aaea330ef0..f032507e3d8 100644
--- a/cpp/test/Ice/proxy/TestI.h
+++ b/cpp/test/Ice/proxy/TestI.h
@@ -12,13 +12,18 @@
#include <Test.h>
-class MyDerivedClassI : public Test::MyDerivedClass
+class MyDerivedClassI :
+#ifdef ICE_CPP11_MAPPING
+ public Test::MyDerivedClassDisp
+#else
+ public Test::MyDerivedClass
+#endif
{
public:
MyDerivedClassI();
- virtual Ice::ObjectPrx echo(const Ice::ObjectPrx&, const Ice::Current&);
+ virtual Ice::ObjectPrxPtr echo(const Ice::ObjectPrxPtr&, const Ice::Current&);
virtual void shutdown(const Ice::Current&);
virtual Ice::Context getContext(const Ice::Current&);
virtual bool ice_isA(const std::string&, const Ice::Current&) const;