summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-08-15 17:21:39 +0000
committerMarc Laukien <marc@zeroc.com>2001-08-15 17:21:39 +0000
commit7aff96f568e834c4c13f26a46843d5ecbb1d325d (patch)
treee801f83704b85d59f80f1516576c3f91290f6d31 /cpp/test
parentfix (diff)
downloadice-7aff96f568e834c4c13f26a46843d5ecbb1d325d.tar.bz2
ice-7aff96f568e834c4c13f26a46843d5ecbb1d325d.tar.xz
ice-7aff96f568e834c4c13f26a46843d5ecbb1d325d.zip
IcePack ; restructuring
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/Makefile26
-rw-r--r--cpp/test/Ice/exceptions/.depend8
-rw-r--r--cpp/test/Ice/exceptions/AllTests.cpp188
-rw-r--r--cpp/test/Ice/exceptions/Client.cpp57
-rw-r--r--cpp/test/Ice/exceptions/Collocated.cpp62
-rw-r--r--cpp/test/Ice/exceptions/Makefile59
-rw-r--r--cpp/test/Ice/exceptions/Server.cpp84
-rw-r--r--cpp/test/Ice/exceptions/Test.ice46
-rw-r--r--cpp/test/Ice/exceptions/TestI.cpp115
-rw-r--r--cpp/test/Ice/exceptions/TestI.h44
-rw-r--r--cpp/test/Ice/exceptions/exceptionsC.dsp157
-rw-r--r--cpp/test/Ice/exceptions/exceptionsCOL.dsp165
-rw-r--r--cpp/test/Ice/exceptions/exceptionsS.dsp161
-rwxr-xr-xcpp/test/Ice/exceptions/run.py26
-rw-r--r--cpp/test/Ice/faultTolerance/.depend5
-rw-r--r--cpp/test/Ice/faultTolerance/AllTests.cpp96
-rw-r--r--cpp/test/Ice/faultTolerance/Client.cpp82
-rw-r--r--cpp/test/Ice/faultTolerance/Makefile49
-rw-r--r--cpp/test/Ice/faultTolerance/Server.cpp104
-rw-r--r--cpp/test/Ice/faultTolerance/Test.ice22
-rw-r--r--cpp/test/Ice/faultTolerance/TestI.cpp41
-rw-r--r--cpp/test/Ice/faultTolerance/TestI.h32
-rw-r--r--cpp/test/Ice/faultTolerance/faulttoleranceC.dsp157
-rw-r--r--cpp/test/Ice/faultTolerance/faulttoleranceS.dsp161
-rwxr-xr-xcpp/test/Ice/faultTolerance/run.py61
-rw-r--r--cpp/test/Ice/inheritance/.depend8
-rw-r--r--cpp/test/Ice/inheritance/AllTests.cpp226
-rw-r--r--cpp/test/Ice/inheritance/Client.cpp57
-rw-r--r--cpp/test/Ice/inheritance/Collocated.cpp62
-rw-r--r--cpp/test/Ice/inheritance/Makefile59
-rw-r--r--cpp/test/Ice/inheritance/Server.cpp84
-rw-r--r--cpp/test/Ice/inheritance/Test.ice82
-rw-r--r--cpp/test/Ice/inheritance/TestI.cpp150
-rw-r--r--cpp/test/Ice/inheritance/TestI.h102
-rw-r--r--cpp/test/Ice/inheritance/inheritanceC.dsp157
-rw-r--r--cpp/test/Ice/inheritance/inheritanceCOL.dsp165
-rw-r--r--cpp/test/Ice/inheritance/inheritanceS.dsp161
-rwxr-xr-xcpp/test/Ice/inheritance/run.py26
-rw-r--r--cpp/test/Ice/locationForward/.depend5
-rw-r--r--cpp/test/Ice/locationForward/AllTests.cpp55
-rw-r--r--cpp/test/Ice/locationForward/Client.cpp96
-rw-r--r--cpp/test/Ice/locationForward/Makefile49
-rw-r--r--cpp/test/Ice/locationForward/Server.cpp116
-rw-r--r--cpp/test/Ice/locationForward/Test.ice19
-rw-r--r--cpp/test/Ice/locationForward/TestI.cpp28
-rw-r--r--cpp/test/Ice/locationForward/TestI.h30
-rw-r--r--cpp/test/Ice/locationForward/locationforwardC.dsp157
-rw-r--r--cpp/test/Ice/locationForward/locationforwardS.dsp161
-rwxr-xr-xcpp/test/Ice/locationForward/run.py63
-rw-r--r--cpp/test/Ice/operations/.depend12
-rw-r--r--cpp/test/Ice/operations/AllTests.cpp49
-rw-r--r--cpp/test/Ice/operations/Client.cpp73
-rw-r--r--cpp/test/Ice/operations/Collocated.cpp62
-rw-r--r--cpp/test/Ice/operations/Exceptions.cpp339
-rw-r--r--cpp/test/Ice/operations/Makefile63
-rw-r--r--cpp/test/Ice/operations/Server.cpp85
-rw-r--r--cpp/test/Ice/operations/Test.ice159
-rw-r--r--cpp/test/Ice/operations/TestI.cpp524
-rw-r--r--cpp/test/Ice/operations/TestI.h125
-rw-r--r--cpp/test/Ice/operations/Twoways.cpp475
-rw-r--r--cpp/test/Ice/operations/operationsC.dsp165
-rw-r--r--cpp/test/Ice/operations/operationsCOL.dsp173
-rw-r--r--cpp/test/Ice/operations/operationsS.dsp161
-rwxr-xr-xcpp/test/Ice/operations/run.py26
-rw-r--r--cpp/test/Makefile6
-rw-r--r--cpp/test/Slice/errorDetection/ClassRedefinition.err2
-rw-r--r--cpp/test/Slice/errorDetection/ClassRedefinition.ice17
-rw-r--r--cpp/test/Slice/errorDetection/DataMemberRedefinition.err1
-rw-r--r--cpp/test/Slice/errorDetection/DataMemberRedefinition.ice15
-rw-r--r--cpp/test/Slice/errorDetection/EnumRedefinition.err1
-rw-r--r--cpp/test/Slice/errorDetection/EnumRedefinition.ice12
-rw-r--r--cpp/test/Slice/errorDetection/EnumeratorRedefinition.err2
-rw-r--r--cpp/test/Slice/errorDetection/EnumeratorRedefinition.ice12
-rw-r--r--cpp/test/Slice/errorDetection/InterfaceMismatch.err6
-rw-r--r--cpp/test/Slice/errorDetection/InterfaceMismatch.ice23
-rw-r--r--cpp/test/Slice/errorDetection/InterfaceRedefinition.err2
-rw-r--r--cpp/test/Slice/errorDetection/InterfaceRedefinition.ice17
-rw-r--r--cpp/test/Slice/errorDetection/LocalMistmatch.err12
-rw-r--r--cpp/test/Slice/errorDetection/LocalMistmatch.ice37
-rw-r--r--cpp/test/Slice/errorDetection/NativeRedefinition.err1
-rw-r--r--cpp/test/Slice/errorDetection/NativeRedefinition.ice12
-rw-r--r--cpp/test/Slice/errorDetection/NotClassOrInterface.err9
-rw-r--r--cpp/test/Slice/errorDetection/NotClassOrInterface.ice18
-rw-r--r--cpp/test/Slice/errorDetection/NotType.err10
-rw-r--r--cpp/test/Slice/errorDetection/NotType.ice23
-rw-r--r--cpp/test/Slice/errorDetection/OperationRedefinition.err1
-rw-r--r--cpp/test/Slice/errorDetection/OperationRedefinition.ice15
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsClass.err2
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsClass.ice15
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsDataMember.err1
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsDataMember.ice15
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsEnum.err1
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsEnum.ice12
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.err2
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.ice13
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsInterface.err2
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsInterface.ice15
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsModule.err1
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsModule.ice14
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsNative.err1
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsNative.ice12
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsOperation.err1
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsOperation.ice15
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsVector.err1
-rw-r--r--cpp/test/Slice/errorDetection/RedefinitionAsVector.ice12
-rw-r--r--cpp/test/Slice/errorDetection/Undefined.err10
-rw-r--r--cpp/test/Slice/errorDetection/Undefined.ice15
-rw-r--r--cpp/test/Slice/errorDetection/VectorRedefinition.err1
-rw-r--r--cpp/test/Slice/errorDetection/VectorRedefinition.ice12
-rw-r--r--cpp/test/Slice/errorDetection/WrongProxyType.err3
-rw-r--r--cpp/test/Slice/errorDetection/WrongProxyType.ice18
-rwxr-xr-xcpp/test/Slice/errorDetection/run.py52
112 files changed, 7112 insertions, 5 deletions
diff --git a/cpp/test/Ice/Makefile b/cpp/test/Ice/Makefile
new file mode 100644
index 00000000000..e753056f8b7
--- /dev/null
+++ b/cpp/test/Ice/Makefile
@@ -0,0 +1,26 @@
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+top_srcdir = ../..
+
+include $(top_srcdir)/config/Make.rules
+
+SUBDIRS = operations \
+ inheritance \
+ exceptions \
+ faultTolerance \
+ locationForward
+
+$(EVERYTHING)::
+ @for subdir in $(SUBDIRS); \
+ do \
+ echo "making $@ in $$subdir"; \
+ ( cd $$subdir && $(MAKE) $@ ) || exit 1; \
+ done
diff --git a/cpp/test/Ice/exceptions/.depend b/cpp/test/Ice/exceptions/.depend
new file mode 100644
index 00000000000..26824bca9b3
--- /dev/null
+++ b/cpp/test/Ice/exceptions/.depend
@@ -0,0 +1,8 @@
+Test.o: Test.cpp Test.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Shared.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/LocalObject.h ../../../include/Ice/LocalException.h
+Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Server.o: Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Collocated.o: Collocated.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
diff --git a/cpp/test/Ice/exceptions/AllTests.cpp b/cpp/test/Ice/exceptions/AllTests.cpp
new file mode 100644
index 00000000000..c80231c67e9
--- /dev/null
+++ b/cpp/test/Ice/exceptions/AllTests.cpp
@@ -0,0 +1,188 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+ThrowerPrx
+allTests(Ice::CommunicatorPtr communicator)
+{
+ cout << "testing stringToProxy... " << flush;
+ string ref("thrower:tcp -p 12345 -t 2000");
+ Ice::ObjectPrx base = communicator->stringToProxy(ref);
+ test(base);
+ cout << "ok" << endl;
+
+ cout << "testing checked cast... " << flush;
+ ThrowerPrx thrower = ThrowerPrx::checkedCast(base);
+ test(thrower);
+ test(thrower == base);
+ cout << "ok" << endl;
+
+ cout << "catching exact types by value... " << flush;
+ try
+ {
+ thrower->throwAasA(1);
+ test(false);
+ }
+ catch(const APtrE& ex)
+ {
+ test(ex->a == 1);
+ const APtr& p = ex;
+ test(p->a == 1);
+ }
+ catch(...)
+ {
+ assert(false);
+ }
+ try
+ {
+ thrower->throwBasB(1, 2);
+ test(false);
+ }
+ catch(const BPtrE& ex)
+ {
+ test(ex->a == 1);
+ test(ex->b == 2);
+ const BPtr& p = ex;
+ test(p->a == 1);
+ test(p->b == 2);
+ }
+ catch(...)
+ {
+ assert(false);
+ }
+ try
+ {
+ thrower->throwCasC(1, 2, 3);
+ test(false);
+ }
+ catch(const CPtrE& ex)
+ {
+ test(ex->a == 1);
+ test(ex->b == 2);
+ test(ex->c == 3);
+ const CPtr& p = ex;
+ test(p->a == 1);
+ test(p->b == 2);
+ test(p->c == 3);
+ }
+ catch(...)
+ {
+ assert(false);
+ }
+ cout << "ok" << endl;
+
+ cout << "catching base types by value... " << flush;
+ try
+ {
+ thrower->throwBasB(1, 2);
+ test(false);
+ }
+ catch(const APtrE& ex)
+ {
+ test(ex->a == 1);
+ const APtr& p = ex;
+ test(p->a == 1);
+ }
+ catch(...)
+ {
+ assert(false);
+ }
+ try
+ {
+ thrower->throwCasC(1, 2, 3);
+ test(false);
+ }
+ catch(const BPtrE& ex)
+ {
+ test(ex->a == 1);
+ test(ex->b == 2);
+ const BPtr& p = ex;
+ test(p->a == 1);
+ test(p->b == 2);
+ }
+ catch(...)
+ {
+ assert(false);
+ }
+ cout << "ok" << endl;
+
+ cout << "catching exact types by proxy... " << flush;
+ try
+ {
+ thrower->throwAasAproxy();
+ test(false);
+ }
+ catch(const APrxE&)
+ {
+ }
+ catch(...)
+ {
+ assert(false);
+ }
+ try
+ {
+ thrower->throwBasBproxy();
+ test(false);
+ }
+ catch(const BPrxE&)
+ {
+ }
+ catch(...)
+ {
+ assert(false);
+ }
+ try
+ {
+ thrower->throwCasCproxy();
+ test(false);
+ }
+ catch(const CPrxE&)
+ {
+ }
+ catch(...)
+ {
+ assert(false);
+ }
+ cout << "ok" << endl;
+
+ cout << "catching base types by proxy... " << flush;
+ try
+ {
+ thrower->throwBasBproxy();
+ test(false);
+ }
+ catch(const APrxE&)
+ {
+ }
+ catch(...)
+ {
+ assert(false);
+ }
+ try
+ {
+ thrower->throwCasCproxy();
+ test(false);
+ }
+ catch(const BPrxE&)
+ {
+ }
+ catch(...)
+ {
+ assert(false);
+ }
+ cout << "ok" << endl;
+
+ return thrower;
+}
diff --git a/cpp/test/Ice/exceptions/Client.cpp b/cpp/test/Ice/exceptions/Client.cpp
new file mode 100644
index 00000000000..033e9929d48
--- /dev/null
+++ b/cpp/test/Ice/exceptions/Client.cpp
@@ -0,0 +1,57 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ ThrowerPrx allTests(Ice::CommunicatorPtr);
+ ThrowerPrx thrower = allTests(communicator);
+ thrower->shutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/exceptions/Collocated.cpp b/cpp/test/Ice/exceptions/Collocated.cpp
new file mode 100644
index 00000000000..ac8866e440d
--- /dev/null
+++ b/cpp/test/Ice/exceptions/Collocated.cpp
@@ -0,0 +1,62 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+using namespace std;
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ string endpts("tcp -p 12345 -t 2000");
+ Ice::ObjectAdapterPtr adapter = communicator ->
+ createObjectAdapterWithEndpoints("testadapter", endpts);
+ Ice::ObjectPtr object = new ThrowerI(adapter);
+ adapter->add(object, "thrower");
+
+ ThrowerPrx allTests(Ice::CommunicatorPtr);
+ allTests(communicator);
+
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/exceptions/Makefile b/cpp/test/Ice/exceptions/Makefile
new file mode 100644
index 00000000000..672ebacc640
--- /dev/null
+++ b/cpp/test/Ice/exceptions/Makefile
@@ -0,0 +1,59 @@
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+CLIENT = client
+SERVER = server
+COLLOCATED = collocated
+
+TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED)
+
+OBJS = Test.o \
+
+COBJS = Client.o \
+ AllTests.o
+
+SOBJS = TestI.o \
+ Server.o
+
+COLOBJS = TestI.o \
+ Collocated.o \
+ AllTests.o
+
+SRCS = $(OBJS:.o=.cpp) \
+ $(COBJS:.o=.cpp) \
+ $(SOBJS:.o=.cpp) \
+ $(COLOBJS:.o=.cpp)
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+
+$(CLIENT): $(OBJS) $(COBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS)
+
+$(SERVER): $(OBJS) $(SOBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS)
+
+$(COLLOCATED): $(OBJS) $(COLOBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COLOBJS) $(LIBS)
+
+Test.h Test.cpp: Test.ice $(SLICE)
+ rm -f Test.h Test.cpp
+ $(SLICE) Test.ice
+
+clean::
+ rm -f Test.h Test.cpp
+
+include .depend
diff --git a/cpp/test/Ice/exceptions/Server.cpp b/cpp/test/Ice/exceptions/Server.cpp
new file mode 100644
index 00000000000..c4bd9f29870
--- /dev/null
+++ b/cpp/test/Ice/exceptions/Server.cpp
@@ -0,0 +1,84 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+using namespace std;
+
+void
+usage(const char* n)
+{
+ cerr << "Usage: " << n << " [--pid]\n";
+}
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ bool pid = false;
+ for (int i = 1; i < argc; ++i)
+ {
+ if(strcmp(argv[i], "--pid") == 0)
+ {
+ pid = true;
+ }
+ else
+ {
+ cerr << argv[0] << ": unknown option `" << argv[i] << "'" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+ }
+
+ string endpts("tcp -p 12345 -t 2000");
+ Ice::ObjectAdapterPtr adapter = communicator -> createObjectAdapterWithEndpoints("testadapter", endpts);
+ Ice::ObjectPtr object = new ThrowerI(adapter);
+ adapter->add(object, "thrower");
+ adapter->activate();
+ if (pid)
+ {
+ cout << getpid() << endl;
+ }
+ communicator->waitForShutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/exceptions/Test.ice b/cpp/test/Ice/exceptions/Test.ice
new file mode 100644
index 00000000000..60d9c4ca1b7
--- /dev/null
+++ b/cpp/test/Ice/exceptions/Test.ice
@@ -0,0 +1,46 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_ICE
+#define TEST_ICE
+
+class A
+{
+ int a;
+};
+
+class B extends A
+{
+ int b;
+};
+
+class C extends B
+{
+ int c;
+};
+
+class Thrower
+{
+ void shutdown();
+ void throwAasA(int a) throws A;
+ void throwAasAproxy() throws A*;
+ void throwBasA(int a, int b) throws A;
+ void throwBasAproxy() throws A*;
+ void throwCasA(int a, int b, int c) throws A;
+ void throwCasAproxy() throws A*;
+ void throwBasB(int a, int b) throws B;
+ void throwBasBproxy() throws B*;
+ void throwCasB(int a, int b, int c) throws B;
+ void throwCasBproxy() throws B*;
+ void throwCasC(int a, int b, int c) throws C;
+ void throwCasCproxy() throws C*;
+};
+
+#endif
diff --git a/cpp/test/Ice/exceptions/TestI.cpp b/cpp/test/Ice/exceptions/TestI.cpp
new file mode 100644
index 00000000000..53ce1565f13
--- /dev/null
+++ b/cpp/test/Ice/exceptions/TestI.cpp
@@ -0,0 +1,115 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+ThrowerI::ThrowerI(const Ice::ObjectAdapterPtr& adapter) :
+ _adapter(adapter)
+{
+ APtr a = new A;
+ _adapter->addTemporary(a);
+ _a = APrx::uncheckedCast(_adapter->objectToProxy(a));
+
+ BPtr b = new B;
+ _adapter->addTemporary(b);
+ _b = BPrx::uncheckedCast(_adapter->objectToProxy(b));
+
+ CPtr c = new C;
+ _adapter->addTemporary(c);
+ _c = CPrx::uncheckedCast(_adapter->objectToProxy(c));
+}
+
+void
+ThrowerI::shutdown()
+{
+ _adapter->getCommunicator()->shutdown();
+}
+
+void
+ThrowerI::throwAasA(Ice::Int a)
+{
+ APtr p = new A;
+ p->a = a;
+ p->_throw();
+}
+
+void
+ThrowerI::throwAasAproxy()
+{
+ _a->_throw();
+}
+
+void
+ThrowerI::throwBasA(Ice::Int a, Ice::Int b)
+{
+ throwBasB(a, b);
+}
+
+void
+ThrowerI::throwBasAproxy()
+{
+ throwBasBproxy();
+}
+
+void
+ThrowerI::throwCasA(Ice::Int a, Ice::Int b, Ice::Int c)
+{
+ throwCasC(a, b, c);
+}
+
+void
+ThrowerI::throwCasAproxy()
+{
+ throwCasCproxy();
+}
+
+void
+ThrowerI::throwBasB(Ice::Int a, Ice::Int b)
+{
+ BPtr p = new B;
+ p->a = a;
+ p->b = b;
+ p->_throw();
+}
+
+void
+ThrowerI::throwBasBproxy()
+{
+ _b->_throw();
+}
+
+void
+ThrowerI::throwCasB(Ice::Int a, Ice::Int b, Ice::Int c)
+{
+ throwCasC(a, b, c);
+}
+
+void
+ThrowerI::throwCasBproxy()
+{
+ throwCasCproxy();
+}
+
+void
+ThrowerI::throwCasC(Ice::Int a, Ice::Int b, Ice::Int c)
+{
+ CPtr p = new C;
+ p->a = a;
+ p->b = b;
+ p->c = c;
+ p->_throw();
+}
+
+void
+ThrowerI::throwCasCproxy()
+{
+ _c->_throw();
+}
diff --git a/cpp/test/Ice/exceptions/TestI.h b/cpp/test/Ice/exceptions/TestI.h
new file mode 100644
index 00000000000..4d3d931f671
--- /dev/null
+++ b/cpp/test/Ice/exceptions/TestI.h
@@ -0,0 +1,44 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_I_H
+#define TEST_I_H
+
+#include <Test.h>
+
+class ThrowerI : public Thrower
+{
+public:
+
+ ThrowerI(const Ice::ObjectAdapterPtr&);
+
+ virtual void shutdown();
+ virtual void throwAasA(Ice::Int);
+ virtual void throwAasAproxy();
+ virtual void throwBasA(Ice::Int, Ice::Int);
+ virtual void throwBasAproxy();
+ virtual void throwCasA(Ice::Int, Ice::Int, Ice::Int);
+ virtual void throwCasAproxy();
+ virtual void throwBasB(Ice::Int, Ice::Int);
+ virtual void throwBasBproxy();
+ virtual void throwCasB(Ice::Int, Ice::Int, Ice::Int);
+ virtual void throwCasBproxy();
+ virtual void throwCasC(Ice::Int, Ice::Int, Ice::Int);
+ virtual void throwCasCproxy();
+
+private:
+
+ Ice::ObjectAdapterPtr _adapter;
+ APrx _a;
+ BPrx _b;
+ CPrx _c;
+};
+
+#endif
diff --git a/cpp/test/Ice/exceptions/exceptionsC.dsp b/cpp/test/Ice/exceptions/exceptionsC.dsp
new file mode 100644
index 00000000000..df68d5e9e06
--- /dev/null
+++ b/cpp/test/Ice/exceptions/exceptionsC.dsp
@@ -0,0 +1,157 @@
+# Microsoft Developer Studio Project File - Name="exceptionsC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=exceptionsC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "exceptionsC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "exceptionsC.mak" CFG="exceptionsC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "exceptionsC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "exceptionsC - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "exceptionsC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "exceptionsC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "exceptionsC - Win32 Release"
+# Name "exceptionsC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AllTests.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "exceptionsC - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "exceptionsC - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/exceptions/exceptionsCOL.dsp b/cpp/test/Ice/exceptions/exceptionsCOL.dsp
new file mode 100644
index 00000000000..84a07e1f770
--- /dev/null
+++ b/cpp/test/Ice/exceptions/exceptionsCOL.dsp
@@ -0,0 +1,165 @@
+# Microsoft Developer Studio Project File - Name="exceptionsCOL" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=exceptionsCOL - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "exceptionsCOL.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "exceptionsCOL.mak" CFG="exceptionsCOL - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "exceptionsCOL - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "exceptionsCOL - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "exceptionsCOL - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"collocated.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "exceptionsCOL - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"collocated.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "exceptionsCOL - Win32 Release"
+# Name "exceptionsCOL - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AllTests.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Collocated.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "exceptionsCOL - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "exceptionsCOL - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/exceptions/exceptionsS.dsp b/cpp/test/Ice/exceptions/exceptionsS.dsp
new file mode 100644
index 00000000000..a29a74f770a
--- /dev/null
+++ b/cpp/test/Ice/exceptions/exceptionsS.dsp
@@ -0,0 +1,161 @@
+# Microsoft Developer Studio Project File - Name="exceptionsS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=exceptionsS - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "exceptionsS.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "exceptionsS.mak" CFG="exceptionsS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "exceptionsS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "exceptionsS - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "exceptionsS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "exceptionsS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "exceptionsS - Win32 Release"
+# Name "exceptionsS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Server.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "exceptionsS - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "exceptionsS - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/exceptions/run.py b/cpp/test/Ice/exceptions/run.py
new file mode 100755
index 00000000000..c6390222383
--- /dev/null
+++ b/cpp/test/Ice/exceptions/run.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+import os, sys
+
+for toplevel in ["", "..", os.path.join("..", ".."), os.path.join("..", "..", "..")]:
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+sys.path.append(os.path.join(toplevel, "config"))
+import TestUtil
+
+name = os.path.join("Ice", "exceptions")
+TestUtil.clientServerTest(toplevel, name)
+TestUtil.collocatedTest(toplevel, name)
+sys.exit(1)
diff --git a/cpp/test/Ice/faultTolerance/.depend b/cpp/test/Ice/faultTolerance/.depend
new file mode 100644
index 00000000000..d2c3e3d6bef
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/.depend
@@ -0,0 +1,5 @@
+Test.o: Test.cpp Test.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Shared.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/LocalObject.h ../../../include/Ice/LocalException.h
+Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Server.o: Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
diff --git a/cpp/test/Ice/faultTolerance/AllTests.cpp b/cpp/test/Ice/faultTolerance/AllTests.cpp
new file mode 100644
index 00000000000..8acbf478e9d
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/AllTests.cpp
@@ -0,0 +1,96 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+#include <sstream>
+
+using namespace std;
+
+void
+allTests(Ice::CommunicatorPtr communicator, const vector<int>& ports)
+{
+ cout << "testing stringToProxy... " << flush;
+ ostringstream ref;
+ ref << "test";
+ for (vector<int>::const_iterator p = ports.begin(); p != ports.end(); ++p)
+ {
+ ref << ":tcp -t 2000 -p " << *p;
+ }
+ Ice::ObjectPrx base = communicator->stringToProxy(ref.str());
+ test(base);
+ cout << "ok" << endl;
+
+ cout << "testing checked cast... " << flush;
+ TestPrx obj = TestPrx::checkedCast(base);
+ test(obj);
+ test(obj == base);
+ cout << "ok" << endl;
+
+ int oldPid = 0;
+ for (unsigned int i = 1, j = 0; i <= ports.size(); ++i, j = j >= 2 ? 0 : j + 1)
+ {
+ cout << "testing server #" << i << "... " << flush;
+ int pid = obj->pid();
+ test(pid != oldPid);
+ cout << "ok" << endl;
+ oldPid = pid;
+
+ if (j == 0)
+ {
+ cout << "shutting down server #" << i << "... " << flush;
+ obj->shutdown();
+ cout << "ok" << endl;
+ }
+ else if(j == 1 || i + 1 > ports.size())
+ {
+ cout << "aborting server #" << i << "... " << flush;
+ try
+ {
+ obj->abort();
+ test(false);
+ }
+ catch(const Ice::SocketException&)
+ {
+ cout << "ok" << endl;
+ }
+ }
+ else if(j == 2)
+ {
+ cout << "aborting server #" << i << " and #" << i + 1 << " with nonmutating call... " << flush;
+ try
+ {
+ obj->nonmutatingAbort();
+ test(false);
+ }
+ catch(const Ice::SocketException&)
+ {
+ cout << "ok" << endl;
+ }
+ ++i;
+ }
+ else
+ {
+ assert(false);
+ }
+ }
+
+ cout << "testing whether all servers are gone... " << flush;
+ try
+ {
+ obj->_ping();
+ test(false);
+ }
+ catch(const Ice::SocketException&)
+ {
+ cout << "ok" << endl;
+ }
+}
diff --git a/cpp/test/Ice/faultTolerance/Client.cpp b/cpp/test/Ice/faultTolerance/Client.cpp
new file mode 100644
index 00000000000..a5c488e9486
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/Client.cpp
@@ -0,0 +1,82 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+void
+usage(const char* n)
+{
+ cerr << "Usage: " << n << " port...\n";
+}
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ vector<int> ports;
+ for (int i = 1; i < argc; ++i)
+ {
+ if (argv[i][0] == '-')
+ {
+ cerr << argv[0] << ": unknown option `" << argv[i] << "'" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ ports.push_back(atoi(argv[i]));
+ }
+
+ if (ports.empty())
+ {
+ cerr << argv[0] << ": no ports specified" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ void allTests(Ice::CommunicatorPtr, const vector<int>&);
+ allTests(communicator, ports);
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/faultTolerance/Makefile b/cpp/test/Ice/faultTolerance/Makefile
new file mode 100644
index 00000000000..448610411ed
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/Makefile
@@ -0,0 +1,49 @@
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+CLIENT = client
+SERVER = server
+
+TARGETS = $(CLIENT) $(SERVER)
+
+OBJS = Test.o \
+
+COBJS = Client.o \
+ AllTests.o
+
+SOBJS = TestI.o \
+ Server.o
+
+SRCS = $(OBJS:.o=.cpp) \
+ $(COBJS:.o=.cpp) \
+ $(SOBJS:.o=.cpp)
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+
+$(CLIENT): $(OBJS) $(COBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS)
+
+$(SERVER): $(OBJS) $(SOBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS)
+
+Test.h Test.cpp: Test.ice $(SLICE)
+ rm -f Test.h Test.cpp
+ $(SLICE) Test.ice
+
+clean::
+ rm -f Test.h Test.cpp
+
+include .depend
diff --git a/cpp/test/Ice/faultTolerance/Server.cpp b/cpp/test/Ice/faultTolerance/Server.cpp
new file mode 100644
index 00000000000..00fcdbea2e8
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/Server.cpp
@@ -0,0 +1,104 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+#include <sstream>
+
+using namespace std;
+
+void
+usage(const char* n)
+{
+ cerr << "Usage: " << n << " [--pid] port\n";
+}
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ int port = 0;
+ bool pid = false;
+ for (int i = 1; i < argc; ++i)
+ {
+ if(strcmp(argv[i], "--pid") == 0)
+ {
+ pid = true;
+ }
+ else if (argv[i][0] == '-')
+ {
+ cerr << argv[0] << ": unknown option `" << argv[i] << "'" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ if (port > 0)
+ {
+ cerr << argv[0] << ": only one port can be specified" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ port = atoi(argv[i]);
+ }
+
+ if (port <= 0)
+ {
+ cerr << argv[0] << ": no port specified" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ ostringstream endpts;
+ endpts << "tcp -p " << port;
+ Ice::ObjectAdapterPtr adapter = communicator -> createObjectAdapterWithEndpoints("testadapter", endpts.str());
+ Ice::ObjectPtr object = new TestI(adapter);
+ adapter->add(object, "test");
+ adapter->activate();
+ if (pid)
+ {
+ cout << getpid() << endl;
+ }
+ communicator->waitForShutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/faultTolerance/Test.ice b/cpp/test/Ice/faultTolerance/Test.ice
new file mode 100644
index 00000000000..f41ff8aa109
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/Test.ice
@@ -0,0 +1,22 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_ICE
+#define TEST_ICE
+
+interface Test
+{
+ void shutdown();
+ void abort();
+ nonmutating void nonmutatingAbort();
+ int pid();
+};
+
+#endif
diff --git a/cpp/test/Ice/faultTolerance/TestI.cpp b/cpp/test/Ice/faultTolerance/TestI.cpp
new file mode 100644
index 00000000000..74a5e5d37a1
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/TestI.cpp
@@ -0,0 +1,41 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+TestI::TestI(const Ice::ObjectAdapterPtr& adapter) :
+ _adapter(adapter)
+{
+}
+
+void
+TestI::shutdown()
+{
+ _adapter->getCommunicator()->shutdown();
+}
+
+void
+TestI::abort()
+{
+ exit(1);
+}
+
+void
+TestI::nonmutatingAbort()
+{
+ exit(1);
+}
+
+Ice::Int
+TestI::pid()
+{
+ return getpid();
+}
diff --git a/cpp/test/Ice/faultTolerance/TestI.h b/cpp/test/Ice/faultTolerance/TestI.h
new file mode 100644
index 00000000000..fef682f3d7e
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/TestI.h
@@ -0,0 +1,32 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_I_H
+#define TEST_I_H
+
+#include <Test.h>
+
+class TestI : public Test
+{
+public:
+
+ TestI(const Ice::ObjectAdapterPtr&);
+
+ virtual void shutdown();
+ virtual void abort();
+ virtual void nonmutatingAbort();
+ virtual Ice::Int pid();
+
+private:
+
+ Ice::ObjectAdapterPtr _adapter;
+};
+
+#endif
diff --git a/cpp/test/Ice/faultTolerance/faulttoleranceC.dsp b/cpp/test/Ice/faultTolerance/faulttoleranceC.dsp
new file mode 100644
index 00000000000..70e4a6ddf51
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/faulttoleranceC.dsp
@@ -0,0 +1,157 @@
+# Microsoft Developer Studio Project File - Name="faultToleranceC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=faultToleranceC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "faultToleranceC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "faultToleranceC.mak" CFG="faultToleranceC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "faultToleranceC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "faultToleranceC - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "faultToleranceC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "faultToleranceC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "faultToleranceC - Win32 Release"
+# Name "faultToleranceC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AllTests.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "faultToleranceC - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "faultToleranceC - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/faultTolerance/faulttoleranceS.dsp b/cpp/test/Ice/faultTolerance/faulttoleranceS.dsp
new file mode 100644
index 00000000000..c9226e83bc3
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/faulttoleranceS.dsp
@@ -0,0 +1,161 @@
+# Microsoft Developer Studio Project File - Name="faultToleranceS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=faultToleranceS - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "faultToleranceS.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "faultToleranceS.mak" CFG="faultToleranceS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "faultToleranceS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "faultToleranceS - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "faultToleranceS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "faultToleranceS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "faultToleranceS - Win32 Release"
+# Name "faultToleranceS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Server.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "faultToleranceS - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "faultToleranceS - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/faultTolerance/run.py b/cpp/test/Ice/faultTolerance/run.py
new file mode 100755
index 00000000000..13f5b0a432b
--- /dev/null
+++ b/cpp/test/Ice/faultTolerance/run.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+import os, sys
+
+for toplevel in ["", "..", os.path.join("..", ".."), os.path.join("..", "..", "..")]:
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+sys.path.append(os.path.join(toplevel, "config"))
+import TestUtil
+
+name = os.path.join("Ice", "faultTolerance")
+
+testdir = os.path.join(toplevel, "test", name)
+server = os.path.join(testdir, "server")
+client = os.path.join(testdir, "client")
+
+num = 8
+base = 12340
+
+serverPipes = { }
+for i in range(0, num):
+ print "starting server #%d..." % (i + 1),
+ serverPipes[i] = os.popen(os.path.join(testdir, "server --pid %d" % (base + i)))
+ output = serverPipes[i].readline().strip()
+ if not output:
+ print "failed!"
+ sys.exit(0)
+ TestUtil.serverPids.append(int(output))
+ print "ok"
+
+print "starting client...",
+ports = ""
+for i in range(0, num):
+ ports = "%s %d" % (ports, base + i)
+clientPipe = os.popen(os.path.join(testdir, "client" + ports))
+output = clientPipe.readline()
+if not output:
+ print "failed!"
+ TestUtil.killServers()
+ sys.exit(0)
+print "ok"
+print output,
+while 1:
+ output = clientPipe.readline()
+ if not output:
+ break;
+ print output,
+
+sys.exit(1)
diff --git a/cpp/test/Ice/inheritance/.depend b/cpp/test/Ice/inheritance/.depend
new file mode 100644
index 00000000000..26824bca9b3
--- /dev/null
+++ b/cpp/test/Ice/inheritance/.depend
@@ -0,0 +1,8 @@
+Test.o: Test.cpp Test.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Shared.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/LocalObject.h ../../../include/Ice/LocalException.h
+Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Server.o: Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Collocated.o: Collocated.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
diff --git a/cpp/test/Ice/inheritance/AllTests.cpp b/cpp/test/Ice/inheritance/AllTests.cpp
new file mode 100644
index 00000000000..4b3a680d0b9
--- /dev/null
+++ b/cpp/test/Ice/inheritance/AllTests.cpp
@@ -0,0 +1,226 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+InitialPrx
+allTests(Ice::CommunicatorPtr communicator)
+{
+ cout << "testing stringToProxy... " << flush;
+ string ref("initial:tcp -p 12345 -t 2000");
+ Ice::ObjectPrx base = communicator->stringToProxy(ref);
+ test(base);
+ cout << "ok" << endl;
+
+ cout << "testing checked cast... " << flush;
+ InitialPrx initial = InitialPrx::checkedCast(base);
+ test(initial);
+ test(initial == base);
+ cout << "ok" << endl;
+
+ cout << "getting proxies for class hierarchy... " << flush;
+ M_A::C_APrx ca = initial->c_a();
+ M_B::C_BPrx cb = initial->c_b();
+ M_A::C_CPrx cc = initial->c_c();
+ M_A::C_DPrx cd = initial->c_d();
+ test(ca != cb);
+ test(ca != cc);
+ test(ca != cd);
+ test(cb != cc);
+ test(cb != cd);
+ test(cc != cd);
+ cout << "ok" << endl;
+
+ cout << "getting proxies for interface hierarchy... " << flush;
+ M_A::I_APrx ia = initial->i_a();
+ M_B::I_B1Prx ib1 = initial->i_b1();
+ M_B::I_B2Prx ib2 = initial->i_b2();
+ M_A::I_CPrx ic = initial->i_c();
+ test(ia != ib1);
+ test(ia != ib2);
+ test(ia != ic);
+ test(ib1 != ib2);
+ test(ib1 != ic);
+ test(ib2 != ic);
+ cout << "ok" << endl;
+
+ cout << "invoking proxy operations on class hierarchy... " << flush;
+ M_A::C_APrx cao;
+ M_B::C_BPrx cbo;
+ M_A::C_CPrx cco;
+
+ cao = ca->ca(ca);
+ test(cao == ca);
+ cao = ca->ca(cb);
+ test(cao == cb);
+ cao = ca->ca(cc);
+ test(cao == cc);
+ cao = cb->ca(ca);
+ test(cao == ca);
+ cao = cb->ca(cb);
+ test(cao == cb);
+ cao = cb->ca(cc);
+ test(cao == cc);
+ cao = cc->ca(ca);
+ test(cao == ca);
+ cao = cc->ca(cb);
+ test(cao == cb);
+ cao = cc->ca(cc);
+ test(cao == cc);
+
+ cao = cb->cb(cb);
+ test(cao == cb);
+ cbo = cb->cb(cb);
+ test(cbo == cb);
+ cao = cb->cb(cc);
+ test(cao == cc);
+ cbo = cb->cb(cc);
+ test(cbo == cc);
+ cao = cc->cb(cb);
+ test(cao == cb);
+ cbo = cc->cb(cb);
+ test(cbo == cb);
+ cao = cc->cb(cc);
+ test(cao == cc);
+ cbo = cc->cb(cc);
+ test(cbo == cc);
+
+ cao = cc->cc(cc);
+ test(cao == cc);
+ cbo = cc->cc(cc);
+ test(cbo == cc);
+ cco = cc->cc(cc);
+ test(cco == cc);
+
+ cout << "ok" << endl;
+
+ cout << "ditto, but for interface hierarchy... " << flush;
+ M_A::I_APrx iao;
+ M_B::I_B1Prx ib1o;
+ M_B::I_B2Prx ib2o;
+ M_A::I_CPrx ico;
+
+ iao = ia->ia(ia);
+ test(iao == ia);
+ iao = ia->ia(ib1);
+ test(iao == ib1);
+ iao = ia->ia(ib2);
+ test(iao == ib2);
+ iao = ia->ia(ic);
+ test(iao == ic);
+ iao = ib1->ia(ia);
+ test(iao == ia);
+ iao = ib1->ia(ib1);
+ test(iao == ib1);
+ iao = ib1->ia(ib2);
+ test(iao == ib2);
+ iao = ib1->ia(ic);
+ test(iao == ic);
+ iao = ib2->ia(ia);
+ test(iao == ia);
+ iao = ib2->ia(ib1);
+ test(iao == ib1);
+ iao = ib2->ia(ib2);
+ test(iao == ib2);
+ iao = ib2->ia(ic);
+ test(iao == ic);
+ iao = ic->ia(ia);
+ test(iao == ia);
+ iao = ic->ia(ib1);
+ test(iao == ib1);
+ iao = ic->ia(ib2);
+ test(iao == ib2);
+ iao = ic->ia(ic);
+ test(iao == ic);
+
+ iao = ib1->ib1(ib1);
+ test(iao == ib1);
+ ib1o = ib1->ib1(ib1);
+ test(ib1o == ib1);
+ iao = ib1->ib1(ic);
+ test(iao == ic);
+ ib1o = ib1->ib1(ic);
+ test(ib1o == ic);
+ iao = ic->ib1(ib1);
+ test(iao == ib1);
+ ib1o = ic->ib1(ib1);
+ test(ib1o == ib1);
+ iao = ic->ib1(ic);
+ test(iao == ic);
+ ib1o = ic->ib1(ic);
+ test(ib1o == ic);
+
+ iao = ib2->ib2(ib2);
+ test(iao == ib2);
+ ib2o = ib2->ib2(ib2);
+ test(ib2o == ib2);
+ iao = ib2->ib2(ic);
+ test(iao == ic);
+ ib2o = ib2->ib2(ic);
+ test(ib2o == ic);
+ iao = ic->ib2(ib2);
+ test(iao == ib2);
+ ib2o = ic->ib2(ib2);
+ test(ib2o == ib2);
+ iao = ic->ib2(ic);
+ test(iao == ic);
+ ib2o = ic->ib2(ic);
+ test(ib2o == ic);
+
+ iao = ic->ic(ic);
+ test(iao == ic);
+ ib1o = ic->ic(ic);
+ test(ib1o == ic);
+ ib2o = ic->ic(ic);
+ test(ib2o == ic);
+ ico = ic->ic(ic);
+ test(ico == ic);
+
+ cout << "ok" << endl;
+
+ cout << "ditto, but for class implementing interfaces... " << flush;
+ M_A::C_DPrx cdo;
+
+ cao = cd->ca(cd);
+ test(cao == cd);
+ cbo = cd->cb(cd);
+ test(cbo == cd);
+ cco = cd->cc(cd);
+ test(cco == cd);
+
+ iao = cd->ia(cd);
+ test(iao == cd);
+ ib1o = cd->ib1(cd);
+ test(ib1o == cd);
+ ib2o = cd->ib2(cd);
+ test(ib2o == cd);
+
+ cao = cd->cd(cd);
+ test(cao == cd);
+ cbo = cd->cd(cd);
+ test(cbo == cd);
+ cco = cd->cd(cd);
+ test(cco == cd);
+
+ iao = cd->cd(cd);
+ test(iao == cd);
+ ib1o = cd->cd(cd);
+ test(ib1o == cd);
+ ib2o = cd->cd(cd);
+ test(ib2o == cd);
+
+ cout << "ok" << endl;
+
+ return initial;
+}
diff --git a/cpp/test/Ice/inheritance/Client.cpp b/cpp/test/Ice/inheritance/Client.cpp
new file mode 100644
index 00000000000..28aa409f55e
--- /dev/null
+++ b/cpp/test/Ice/inheritance/Client.cpp
@@ -0,0 +1,57 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ InitialPrx allTests(Ice::CommunicatorPtr);
+ InitialPrx initial = allTests(communicator);
+ initial->shutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/inheritance/Collocated.cpp b/cpp/test/Ice/inheritance/Collocated.cpp
new file mode 100644
index 00000000000..e0ef8cb6e98
--- /dev/null
+++ b/cpp/test/Ice/inheritance/Collocated.cpp
@@ -0,0 +1,62 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+using namespace std;
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ string endpts("tcp -p 12345 -t 2000");
+ Ice::ObjectAdapterPtr adapter = communicator ->
+ createObjectAdapterWithEndpoints("testadapter", endpts);
+ Ice::ObjectPtr object = new InitialI(adapter);
+ adapter->add(object, "initial");
+
+ InitialPrx allTests(Ice::CommunicatorPtr);
+ allTests(communicator);
+
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/inheritance/Makefile b/cpp/test/Ice/inheritance/Makefile
new file mode 100644
index 00000000000..672ebacc640
--- /dev/null
+++ b/cpp/test/Ice/inheritance/Makefile
@@ -0,0 +1,59 @@
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+CLIENT = client
+SERVER = server
+COLLOCATED = collocated
+
+TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED)
+
+OBJS = Test.o \
+
+COBJS = Client.o \
+ AllTests.o
+
+SOBJS = TestI.o \
+ Server.o
+
+COLOBJS = TestI.o \
+ Collocated.o \
+ AllTests.o
+
+SRCS = $(OBJS:.o=.cpp) \
+ $(COBJS:.o=.cpp) \
+ $(SOBJS:.o=.cpp) \
+ $(COLOBJS:.o=.cpp)
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+
+$(CLIENT): $(OBJS) $(COBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS)
+
+$(SERVER): $(OBJS) $(SOBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS)
+
+$(COLLOCATED): $(OBJS) $(COLOBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COLOBJS) $(LIBS)
+
+Test.h Test.cpp: Test.ice $(SLICE)
+ rm -f Test.h Test.cpp
+ $(SLICE) Test.ice
+
+clean::
+ rm -f Test.h Test.cpp
+
+include .depend
diff --git a/cpp/test/Ice/inheritance/Server.cpp b/cpp/test/Ice/inheritance/Server.cpp
new file mode 100644
index 00000000000..14e985c66e3
--- /dev/null
+++ b/cpp/test/Ice/inheritance/Server.cpp
@@ -0,0 +1,84 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+using namespace std;
+
+void
+usage(const char* n)
+{
+ cerr << "Usage: " << n << " [--pid]\n";
+}
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ bool pid = false;
+ for (int i = 1; i < argc; ++i)
+ {
+ if(strcmp(argv[i], "--pid") == 0)
+ {
+ pid = true;
+ }
+ else
+ {
+ cerr << argv[0] << ": unknown option `" << argv[i] << "'" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+ }
+
+ string endpts("tcp -p 12345 -t 2000");
+ Ice::ObjectAdapterPtr adapter = communicator -> createObjectAdapterWithEndpoints("testadapter", endpts);
+ Ice::ObjectPtr object = new InitialI(adapter);
+ adapter->add(object, "initial");
+ adapter->activate();
+ if (pid)
+ {
+ cout << getpid() << endl;
+ }
+ communicator->waitForShutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/inheritance/Test.ice b/cpp/test/Ice/inheritance/Test.ice
new file mode 100644
index 00000000000..b05492b092e
--- /dev/null
+++ b/cpp/test/Ice/inheritance/Test.ice
@@ -0,0 +1,82 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_ICE
+#define TEST_ICE
+
+module M_A
+{
+
+interface I_A
+{
+ I_A* ia(I_A* p);
+};
+
+class C_A
+{
+ C_A* ca(C_A* p);
+};
+
+};
+
+module M_B
+{
+
+interface I_B1 extends M_A::I_A
+{
+ I_B1* ib1(I_B1* p);
+};
+
+interface I_B2 extends M_A::I_A
+{
+ I_B2* ib2(I_B2* p);
+};
+
+class C_B extends M_A::C_A
+{
+ C_B* cb(C_B* p);
+};
+
+};
+
+module M_A
+{
+
+interface I_C extends M_B::I_B1, M_B::I_B2
+{
+ I_C* ic(I_C* p);
+};
+
+class C_C extends M_B::C_B
+{
+ C_C* cc(C_C* p);
+};
+
+class C_D extends C_C implements M_B::I_B1, M_B::I_B2
+{
+ C_D* cd(C_D* p);
+};
+
+};
+
+interface Initial
+{
+ void shutdown();
+ M_A::C_A* c_a();
+ M_B::C_B* c_b();
+ M_A::C_C* c_c();
+ M_A::C_D* c_d();
+ M_A::I_A* i_a();
+ M_B::I_B1* i_b1();
+ M_B::I_B2* i_b2();
+ M_A::I_C* i_c();
+};
+
+#endif
diff --git a/cpp/test/Ice/inheritance/TestI.cpp b/cpp/test/Ice/inheritance/TestI.cpp
new file mode 100644
index 00000000000..9023a1731e3
--- /dev/null
+++ b/cpp/test/Ice/inheritance/TestI.cpp
@@ -0,0 +1,150 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+M_A::C_APrx
+C_A_I::ca(const M_A::C_APrx& p)
+{
+ return p;
+}
+
+M_B::C_BPrx
+C_B_I::cb(const M_B::C_BPrx& p)
+{
+ return p;
+}
+
+M_A::C_CPrx
+C_C_I::cc(const M_A::C_CPrx& p)
+{
+ return p;
+}
+
+M_A::C_DPrx
+C_D_I::cd(const M_A::C_DPrx& p)
+{
+ return p;
+}
+
+M_A::I_APrx
+I_A_I::ia(const M_A::I_APrx& p)
+{
+ return p;
+}
+
+M_B::I_B1Prx
+I_B1_I::ib1(const M_B::I_B1Prx& p)
+{
+ return p;
+}
+
+M_B::I_B2Prx
+I_B2_I::ib2(const M_B::I_B2Prx& p)
+{
+ return p;
+}
+
+M_A::I_CPrx
+I_C_I::ic(const M_A::I_CPrx& p)
+{
+ return p;
+}
+
+InitialI::InitialI(const Ice::ObjectAdapterPtr& adapter) :
+ _adapter(adapter)
+{
+ Ice::ObjectPtr cai = new C_A_I;
+ _adapter->addTemporary(cai);
+ _ca = M_A::C_APrx::uncheckedCast(_adapter->objectToProxy(cai));
+
+ Ice::ObjectPtr cbi = new C_B_I;
+ _adapter->addTemporary(cbi);
+ _cb = M_B::C_BPrx::uncheckedCast(_adapter->objectToProxy(cbi));
+
+ Ice::ObjectPtr cci = new C_C_I;
+ _adapter->addTemporary(cci);
+ _cc = M_A::C_CPrx::uncheckedCast(_adapter->objectToProxy(cci));
+
+ Ice::ObjectPtr cdi = new C_D_I;
+ _adapter->addTemporary(cdi);
+ _cd = M_A::C_DPrx::uncheckedCast(_adapter->objectToProxy(cdi));
+
+ Ice::ObjectPtr iai = new I_A_I;
+ _adapter->addTemporary(iai);
+ _ia = M_A::I_APrx::uncheckedCast(_adapter->objectToProxy(iai));
+
+ Ice::ObjectPtr ib1i = new I_B1_I;
+ _adapter->addTemporary(ib1i);
+ _ib1 = M_B::I_B1Prx::uncheckedCast(_adapter->objectToProxy(ib1i));
+
+ Ice::ObjectPtr ib2i = new I_B2_I;
+ _adapter->addTemporary(ib2i);
+ _ib2 = M_B::I_B2Prx::uncheckedCast(_adapter->objectToProxy(ib2i));
+
+ Ice::ObjectPtr ici = new I_C_I;
+ _adapter->addTemporary(ici);
+ _ic = M_A::I_CPrx::uncheckedCast(_adapter->objectToProxy(ici));
+}
+
+void
+InitialI::shutdown()
+{
+ _adapter->getCommunicator()->shutdown();
+}
+
+M_A::C_APrx
+InitialI::c_a()
+{
+ return _ca;
+}
+
+M_B::C_BPrx
+InitialI::c_b()
+{
+ return _cb;
+}
+
+M_A::C_CPrx
+InitialI::c_c()
+{
+ return _cc;
+}
+
+M_A::C_DPrx
+InitialI::c_d()
+{
+ return _cd;
+}
+
+M_A::I_APrx
+InitialI::i_a()
+{
+ return _ia;
+}
+
+M_B::I_B1Prx
+InitialI::i_b1()
+{
+ return _ib1;
+}
+
+M_B::I_B2Prx
+InitialI::i_b2()
+{
+ return _ib2;
+}
+
+M_A::I_CPrx
+InitialI::i_c()
+{
+ return _ic;
+}
diff --git a/cpp/test/Ice/inheritance/TestI.h b/cpp/test/Ice/inheritance/TestI.h
new file mode 100644
index 00000000000..222374aa263
--- /dev/null
+++ b/cpp/test/Ice/inheritance/TestI.h
@@ -0,0 +1,102 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_I_H
+#define TEST_I_H
+
+#include <Test.h>
+
+class InitialI : public Initial
+{
+public:
+
+ InitialI(const Ice::ObjectAdapterPtr&);
+
+ virtual void shutdown();
+
+ virtual M_A::C_APrx c_a();
+ virtual M_B::C_BPrx c_b();
+ virtual M_A::C_CPrx c_c();
+ virtual M_A::C_DPrx c_d();
+ virtual M_A::I_APrx i_a();
+ virtual M_B::I_B1Prx i_b1();
+ virtual M_B::I_B2Prx i_b2();
+ virtual M_A::I_CPrx i_c();
+
+private:
+
+ Ice::ObjectAdapterPtr _adapter;
+ M_A::C_APrx _ca;
+ M_B::C_BPrx _cb;
+ M_A::C_CPrx _cc;
+ M_A::C_DPrx _cd;
+ M_A::I_APrx _ia;
+ M_B::I_B1Prx _ib1;
+ M_B::I_B2Prx _ib2;
+ M_A::I_CPrx _ic;
+};
+
+class C_A_I : virtual public M_A::C_A
+{
+public:
+
+ virtual M_A::C_APrx ca(const M_A::C_APrx&);
+};
+
+class C_B_I : virtual public M_B::C_B, virtual public C_A_I
+{
+public:
+
+ virtual M_B::C_BPrx cb(const M_B::C_BPrx&);
+};
+
+class C_C_I : virtual public M_A::C_C, virtual public C_B_I
+{
+public:
+
+ virtual M_A::C_CPrx cc(const M_A::C_CPrx&);
+};
+
+class I_A_I : virtual public M_A::I_A
+{
+public:
+
+ virtual M_A::I_APrx ia(const M_A::I_APrx&);
+};
+
+class I_B1_I : virtual public M_B::I_B1, virtual public I_A_I
+{
+public:
+
+ virtual M_B::I_B1Prx ib1(const M_B::I_B1Prx&);
+};
+
+class I_B2_I : virtual public M_B::I_B2, virtual public I_A_I
+{
+public:
+
+ virtual M_B::I_B2Prx ib2(const M_B::I_B2Prx&);
+};
+
+class I_C_I : virtual public M_A::I_C, virtual public I_B1_I, virtual public I_B2_I
+{
+public:
+
+ virtual M_A::I_CPrx ic(const M_A::I_CPrx&);
+};
+
+class C_D_I : virtual public M_A::C_D, virtual public C_C_I, virtual public I_B1_I, virtual public I_B2_I
+{
+public:
+
+ virtual M_A::C_DPrx cd(const M_A::C_DPrx&);
+};
+
+#endif
diff --git a/cpp/test/Ice/inheritance/inheritanceC.dsp b/cpp/test/Ice/inheritance/inheritanceC.dsp
new file mode 100644
index 00000000000..6b40a2102e4
--- /dev/null
+++ b/cpp/test/Ice/inheritance/inheritanceC.dsp
@@ -0,0 +1,157 @@
+# Microsoft Developer Studio Project File - Name="inheritanceC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=inheritanceC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "inheritanceC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "inheritanceC.mak" CFG="inheritanceC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "inheritanceC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "inheritanceC - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "inheritanceC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "inheritanceC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "inheritanceC - Win32 Release"
+# Name "inheritanceC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AllTests.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "inheritanceC - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "inheritanceC - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/inheritance/inheritanceCOL.dsp b/cpp/test/Ice/inheritance/inheritanceCOL.dsp
new file mode 100644
index 00000000000..b15f0b1fea3
--- /dev/null
+++ b/cpp/test/Ice/inheritance/inheritanceCOL.dsp
@@ -0,0 +1,165 @@
+# Microsoft Developer Studio Project File - Name="inheritanceCOL" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=inheritanceCOL - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "inheritanceCOL.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "inheritanceCOL.mak" CFG="inheritanceCOL - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "inheritanceCOL - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "inheritanceCOL - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "inheritanceCOL - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"collocated.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "inheritanceCOL - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"collocated.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "inheritanceCOL - Win32 Release"
+# Name "inheritanceCOL - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AllTests.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Collocated.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "inheritanceCOL - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "inheritanceCOL - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/inheritance/inheritanceS.dsp b/cpp/test/Ice/inheritance/inheritanceS.dsp
new file mode 100644
index 00000000000..d62e88a93b8
--- /dev/null
+++ b/cpp/test/Ice/inheritance/inheritanceS.dsp
@@ -0,0 +1,161 @@
+# Microsoft Developer Studio Project File - Name="inheritanceS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=inheritanceS - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "inheritanceS.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "inheritanceS.mak" CFG="inheritanceS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "inheritanceS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "inheritanceS - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "inheritanceS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "inheritanceS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "inheritanceS - Win32 Release"
+# Name "inheritanceS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Server.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "inheritanceS - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "inheritanceS - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/inheritance/run.py b/cpp/test/Ice/inheritance/run.py
new file mode 100755
index 00000000000..11efe6c5045
--- /dev/null
+++ b/cpp/test/Ice/inheritance/run.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+import os, sys
+
+for toplevel in ["", "..", os.path.join("..", ".."), os.path.join("..", "..", "..")]:
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+sys.path.append(os.path.join(toplevel, "config"))
+import TestUtil
+
+name = os.path.join("Ice", "inheritance")
+TestUtil.clientServerTest(toplevel, name)
+TestUtil.collocatedTest(toplevel, name)
+sys.exit(1)
diff --git a/cpp/test/Ice/locationForward/.depend b/cpp/test/Ice/locationForward/.depend
new file mode 100644
index 00000000000..d2c3e3d6bef
--- /dev/null
+++ b/cpp/test/Ice/locationForward/.depend
@@ -0,0 +1,5 @@
+Test.o: Test.cpp Test.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Shared.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/LocalObject.h ../../../include/Ice/LocalException.h
+Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Server.o: Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
diff --git a/cpp/test/Ice/locationForward/AllTests.cpp b/cpp/test/Ice/locationForward/AllTests.cpp
new file mode 100644
index 00000000000..c8bb3a865f1
--- /dev/null
+++ b/cpp/test/Ice/locationForward/AllTests.cpp
@@ -0,0 +1,55 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+#include <sstream>
+
+using namespace std;
+
+void
+allTests(Ice::CommunicatorPtr communicator, int port, int lastPort)
+{
+ cout << "testing stringToProxy... " << flush;
+ ostringstream ref;
+ ref << "test:tcp -t 2000 -p " << port;
+ Ice::ObjectPrx base = communicator->stringToProxy(ref.str());
+ test(base);
+ ostringstream lastRef;
+ lastRef << "test:tcp -t 2000 -p " << lastPort;
+ Ice::ObjectPrx lastBase = communicator->stringToProxy(lastRef.str());
+ test(lastBase);
+ cout << "ok" << endl;
+
+ cout << "testing checked cast... " << flush;
+ TestPrx obj = TestPrx::checkedCast(base);
+ test(obj);
+ test(obj == base);
+ TestPrx lastObj = TestPrx::checkedCast(lastBase);
+ test(lastObj);
+ test(lastObj == lastBase);
+ cout << "ok" << endl;
+
+ cout << "shutting down all servers with single call... " << flush;
+ obj->shutdown();
+ cout << "ok" << endl;
+
+ cout << "testing whether all servers are gone... " << flush;
+ try
+ {
+ lastObj->_ping();
+ test(false);
+ }
+ catch(const Ice::SocketException&)
+ {
+ cout << "ok" << endl;
+ }
+}
diff --git a/cpp/test/Ice/locationForward/Client.cpp b/cpp/test/Ice/locationForward/Client.cpp
new file mode 100644
index 00000000000..266789f30a0
--- /dev/null
+++ b/cpp/test/Ice/locationForward/Client.cpp
@@ -0,0 +1,96 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+void
+usage(const char* n)
+{
+ cerr << "Usage: " << n << " port port\n";
+}
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ int port = 0;
+ int lastPort = 0;
+ for (int i = 1; i < argc; ++i)
+ {
+ if (argv[i][0] == '-')
+ {
+ cerr << argv[0] << ": unknown option `" << argv[i] << "'" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ if (port == 0)
+ {
+ port = atoi(argv[i]);
+ }
+ else if(lastPort == 0)
+ {
+ lastPort = atoi(argv[i]);
+ }
+ else
+ {
+ cerr << argv[0] << ": only one two ports can be specified" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+ }
+
+ if (port == 0 || lastPort == 0)
+ {
+ cerr << argv[0] << ": no ports specified" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ void allTests(Ice::CommunicatorPtr, int, int);
+ allTests(communicator, port, lastPort);
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/locationForward/Makefile b/cpp/test/Ice/locationForward/Makefile
new file mode 100644
index 00000000000..448610411ed
--- /dev/null
+++ b/cpp/test/Ice/locationForward/Makefile
@@ -0,0 +1,49 @@
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+CLIENT = client
+SERVER = server
+
+TARGETS = $(CLIENT) $(SERVER)
+
+OBJS = Test.o \
+
+COBJS = Client.o \
+ AllTests.o
+
+SOBJS = TestI.o \
+ Server.o
+
+SRCS = $(OBJS:.o=.cpp) \
+ $(COBJS:.o=.cpp) \
+ $(SOBJS:.o=.cpp)
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+
+$(CLIENT): $(OBJS) $(COBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS)
+
+$(SERVER): $(OBJS) $(SOBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS)
+
+Test.h Test.cpp: Test.ice $(SLICE)
+ rm -f Test.h Test.cpp
+ $(SLICE) Test.ice
+
+clean::
+ rm -f Test.h Test.cpp
+
+include .depend
diff --git a/cpp/test/Ice/locationForward/Server.cpp b/cpp/test/Ice/locationForward/Server.cpp
new file mode 100644
index 00000000000..c87e0c26150
--- /dev/null
+++ b/cpp/test/Ice/locationForward/Server.cpp
@@ -0,0 +1,116 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+#include <sstream>
+
+using namespace std;
+
+void
+usage(const char* n)
+{
+ cerr << "Usage: " << n << " [--pid] [--fwd reference] port\n";
+}
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ int port = 0;
+ bool pid = false;
+ Ice::ObjectPrx fwd;
+ for (int i = 1; i < argc; ++i)
+ {
+ if(strcmp(argv[i], "--pid") == 0)
+ {
+ pid = true;
+ }
+ else if (strcmp(argv[i], "--fwd") == 0)
+ {
+ if (i + 1 >= argc)
+ {
+ cerr << argv[0] << ": argument expected for`" << argv[i] << "'" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ fwd = communicator->stringToProxy(argv[++i]);
+ }
+ else if (argv[i][0] == '-')
+ {
+ cerr << argv[0] << ": unknown option `" << argv[i] << "'" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ if (port > 0)
+ {
+ cerr << argv[0] << ": only one port can be specified" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ port = atoi(argv[i]);
+ }
+
+ if (port <= 0)
+ {
+ cerr << argv[0] << ": no port specified" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+
+ ostringstream endpts;
+ endpts << "tcp -p " << port;
+ Ice::ObjectAdapterPtr adapter = communicator -> createObjectAdapterWithEndpoints("testadapter", endpts.str());
+ Ice::ObjectPtr object = new TestI(adapter, fwd);
+ adapter->add(object, "test");
+ adapter->activate();
+ if (pid)
+ {
+ cout << getpid() << endl;
+ }
+ communicator->waitForShutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/locationForward/Test.ice b/cpp/test/Ice/locationForward/Test.ice
new file mode 100644
index 00000000000..e154679d6a5
--- /dev/null
+++ b/cpp/test/Ice/locationForward/Test.ice
@@ -0,0 +1,19 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_ICE
+#define TEST_ICE
+
+interface Test
+{
+ void shutdown();
+};
+
+#endif
diff --git a/cpp/test/Ice/locationForward/TestI.cpp b/cpp/test/Ice/locationForward/TestI.cpp
new file mode 100644
index 00000000000..1b67b65a649
--- /dev/null
+++ b/cpp/test/Ice/locationForward/TestI.cpp
@@ -0,0 +1,28 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+TestI::TestI(const Ice::ObjectAdapterPtr& adapter, const Ice::ObjectPrx fwd) :
+ _adapter(adapter),
+ _fwd(fwd)
+{
+}
+
+void
+TestI::shutdown()
+{
+ _adapter->getCommunicator()->shutdown();
+ if (_fwd)
+ {
+ throw Ice::LocationForward(_fwd);
+ }
+}
diff --git a/cpp/test/Ice/locationForward/TestI.h b/cpp/test/Ice/locationForward/TestI.h
new file mode 100644
index 00000000000..47bf08726fa
--- /dev/null
+++ b/cpp/test/Ice/locationForward/TestI.h
@@ -0,0 +1,30 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_I_H
+#define TEST_I_H
+
+#include <Test.h>
+
+class TestI : public Test
+{
+public:
+
+ TestI(const Ice::ObjectAdapterPtr&, const Ice::ObjectPrx);
+
+ virtual void shutdown();
+
+private:
+
+ Ice::ObjectAdapterPtr _adapter;
+ Ice::ObjectPrx _fwd;
+};
+
+#endif
diff --git a/cpp/test/Ice/locationForward/locationforwardC.dsp b/cpp/test/Ice/locationForward/locationforwardC.dsp
new file mode 100644
index 00000000000..105ee8bafce
--- /dev/null
+++ b/cpp/test/Ice/locationForward/locationforwardC.dsp
@@ -0,0 +1,157 @@
+# Microsoft Developer Studio Project File - Name="locationForwardC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=locationForwardC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "locationForwardC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "locationForwardC.mak" CFG="locationForwardC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "locationForwardC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "locationForwardC - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "locationForwardC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "locationForwardC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "locationForwardC - Win32 Release"
+# Name "locationForwardC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AllTests.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "locationForwardC - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "locationForwardC - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/locationForward/locationforwardS.dsp b/cpp/test/Ice/locationForward/locationforwardS.dsp
new file mode 100644
index 00000000000..8c5bafcd7d1
--- /dev/null
+++ b/cpp/test/Ice/locationForward/locationforwardS.dsp
@@ -0,0 +1,161 @@
+# Microsoft Developer Studio Project File - Name="locationForwardS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=locationForwardS - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "locationForwardS.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "locationForwardS.mak" CFG="locationForwardS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "locationForwardS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "locationForwardS - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "locationForwardS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "locationForwardS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "locationForwardS - Win32 Release"
+# Name "locationForwardS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Server.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "locationForwardS - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "locationForwardS - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/locationForward/run.py b/cpp/test/Ice/locationForward/run.py
new file mode 100755
index 00000000000..f09af503ef4
--- /dev/null
+++ b/cpp/test/Ice/locationForward/run.py
@@ -0,0 +1,63 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+import os, sys
+
+for toplevel in ["", "..", os.path.join("..", ".."), os.path.join("..", "..", "..")]:
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+sys.path.append(os.path.join(toplevel, "config"))
+import TestUtil
+
+name = os.path.join("Ice", "locationForward")
+
+testdir = os.path.join(toplevel, "test", name)
+server = os.path.join(testdir, "server")
+client = os.path.join(testdir, "client")
+
+num = 5
+base = 12340
+
+serverPipes = { }
+for i in range(0, num):
+ print "starting server #%d..." % (i + 1),
+ if i + 1 < num:
+ s = "server --pid --fwd \"test:tcp -t 2000 -p %d\" %d" % ((base + i + 1), (base + i))
+ else:
+ s = "server --pid %d" % (base + i)
+ serverPipes[i] = os.popen(os.path.join(testdir, s))
+ output = serverPipes[i].readline().strip()
+ if not output:
+ print "failed!"
+ sys.exit(0)
+ TestUtil.serverPids.append(int(output))
+ print "ok"
+
+print "starting client...",
+s = "client %d %d" % (base, (base + num - 1))
+clientPipe = os.popen(os.path.join(testdir, s))
+output = clientPipe.readline()
+if not output:
+ print "failed!"
+ TestUtil.killServers()
+ sys.exit(0)
+print "ok"
+print output,
+while 1:
+ output = clientPipe.readline()
+ if not output:
+ break;
+ print output,
+
+sys.exit(1)
diff --git a/cpp/test/Ice/operations/.depend b/cpp/test/Ice/operations/.depend
new file mode 100644
index 00000000000..ab83ee3dbf0
--- /dev/null
+++ b/cpp/test/Ice/operations/.depend
@@ -0,0 +1,12 @@
+Test.o: Test.cpp Test.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Shared.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/LocalObject.h ../../../include/Ice/LocalException.h
+Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Twoways.o: Twoways.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Exceptions.o: Exceptions.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Server.o: Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Collocated.o: Collocated.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h TestI.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Twoways.o: Twoways.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
+Exceptions.o: Exceptions.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Communicator.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Native.h ../../../include/Ice/LocalObject.h ../../../include/Ice/Shared.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/PicklerF.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/ValueFactoryF.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/LocalException.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/ValueFactory.h ../../../include/Ice/Pickler.h ../../../include/Ice/Initialize.h ../../include/TestCommon.h Test.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/Stream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h
diff --git a/cpp/test/Ice/operations/AllTests.cpp b/cpp/test/Ice/operations/AllTests.cpp
new file mode 100644
index 00000000000..2b9ca0e1558
--- /dev/null
+++ b/cpp/test/Ice/operations/AllTests.cpp
@@ -0,0 +1,49 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+Test::MyClassPrx
+allTests(Ice::CommunicatorPtr communicator)
+{
+ cout << "testing stringToProxy... " << flush;
+ string ref("test:tcp -p 12345 -t 2000");
+ Ice::ObjectPrx base = communicator->stringToProxy(ref);
+ test(base);
+ cout << "ok" << endl;
+
+ cout << "testing checked cast... " << flush;
+ Test::MyClassPrx cl = Test::MyClassPrx::checkedCast(base);
+ test(cl);
+ Test::MyDerivedClassPrx derived = Test::MyDerivedClassPrx::checkedCast(cl);
+ test(derived);
+ test(cl == base);
+ test(derived == base);
+ test(cl == derived);
+ cout << "ok" << endl;
+
+ cout << "testing twoway operations... " << flush;
+ void twoways(Test::MyClassPrx);
+ twoways(cl);
+ twoways(derived);
+ derived->opDerived();
+ cout << "ok" << endl;
+
+ cout << "testing exceptions... " << flush;
+ void exceptions(Test::MyClassPrx);
+ exceptions(cl);
+ cout << "ok" << endl;
+
+ return cl;
+}
diff --git a/cpp/test/Ice/operations/Client.cpp b/cpp/test/Ice/operations/Client.cpp
new file mode 100644
index 00000000000..75572304ace
--- /dev/null
+++ b/cpp/test/Ice/operations/Client.cpp
@@ -0,0 +1,73 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ Test::MyClassPrx allTests(Ice::CommunicatorPtr);
+ Test::MyClassPrx myClass = allTests(communicator);
+
+ cout << "testing server shutdown... " << flush;
+ myClass->shutdown();
+ try
+ {
+ myClass->opVoid();
+ test(false);
+ }
+ catch(const Ice::CloseConnectionException&) // TODO: Should not be thrown
+ { // if retry is implemented
+ cout << "ok" << endl;
+ }
+ catch(const Ice::ConnectFailedException&)
+ {
+ cout << "ok" << endl;
+ }
+
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/operations/Collocated.cpp b/cpp/test/Ice/operations/Collocated.cpp
new file mode 100644
index 00000000000..4a34c33bdad
--- /dev/null
+++ b/cpp/test/Ice/operations/Collocated.cpp
@@ -0,0 +1,62 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+using namespace std;
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ string endpts("tcp -p 12345 -t 2000");
+ Ice::ObjectAdapterPtr adapter = communicator ->
+ createObjectAdapterWithEndpoints("testadapter", endpts);
+ Ice::ObjectPtr object = new MyDerivedClassI(adapter);
+ adapter->add(object, "test");
+
+ Test::MyClassPrx allTests(Ice::CommunicatorPtr);
+ allTests(communicator);
+
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/operations/Exceptions.cpp b/cpp/test/Ice/operations/Exceptions.cpp
new file mode 100644
index 00000000000..7d480bf0dd1
--- /dev/null
+++ b/cpp/test/Ice/operations/Exceptions.cpp
@@ -0,0 +1,339 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+void
+exceptions(Test::MyClassPrx p)
+{
+ p->opEx(0);
+
+ try
+ {
+ p->opEx(1);
+ test(false);
+ }
+ catch(Ice::Byte ex)
+ {
+ test(ex == 0x1f);
+ }
+
+ try
+ {
+ p->opEx(2);
+ }
+ catch(bool ex)
+ {
+ test(ex == true);
+ }
+
+ try
+ {
+ p->opEx(3);
+ }
+ catch(Ice::Short ex)
+ {
+ test(ex == 123);
+ }
+
+ try
+ {
+ p->opEx(4);
+ }
+ catch(Ice::Int ex)
+ {
+ test(ex == 456);
+ }
+
+ try
+ {
+ p->opEx(5);
+ }
+ catch(Ice::Long ex)
+ {
+ test(ex == 789);
+ }
+
+ try
+ {
+ p->opEx(6);
+ }
+ catch(Ice::Float ex)
+ {
+ test(ex == Ice::Float(10.1112));
+ }
+
+ try
+ {
+ p->opEx(7);
+ }
+ catch(Ice::Double ex)
+ {
+ test(ex == Ice::Double(13.1415));
+ }
+
+ try
+ {
+ p->opEx(8);
+ }
+ catch(const string& ex)
+ {
+ test(ex == "abc");
+ }
+
+ try
+ {
+ p->opEx(9);
+ }
+ catch(const wstring& ex)
+ {
+ test(ex == L"def");
+ }
+
+ try
+ {
+ p->opEx(10);
+ }
+ catch(const Test::ByteV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0] == Ice::Byte(0x0f));
+ test(ex[1] == Ice::Byte(0xf0));
+ }
+
+ try
+ {
+ p->opEx(11);
+ }
+ catch(const Test::BoolV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0] == true);
+ test(ex[1] == false);
+ }
+
+ try
+ {
+ p->opEx(12);
+ }
+ catch(const Test::ShortV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0] == 1);
+ test(ex[1] == 2);
+ }
+
+ try
+ {
+ p->opEx(13);
+ }
+ catch(const Test::IntV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0] == 3);
+ test(ex[1] == 4);
+ }
+
+ try
+ {
+ p->opEx(14);
+ }
+ catch(const Test::LongV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0] == 5);
+ test(ex[1] == 6);
+ }
+
+ try
+ {
+ p->opEx(15);
+ }
+ catch(const Test::FloatV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0] == Ice::Float(7.7));
+ test(ex[1] == Ice::Float(8.8));
+ }
+
+ try
+ {
+ p->opEx(16);
+ }
+ catch(const Test::DoubleV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0] == Ice::Double(9.9));
+ test(ex[1] == Ice::Double(10.10));
+ }
+
+ try
+ {
+ p->opEx(17);
+ }
+ catch(const Test::StringV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0] == "abc");
+ test(ex[1] == "def");
+ }
+
+ try
+ {
+ p->opEx(18);
+ }
+ catch(const Test::WStringV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0] == L"xxx");
+ test(ex[1] == L"XXX");
+ }
+
+ try
+ {
+ p->opEx(19);
+ }
+ catch(const Test::ByteVV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0].size() == 1);
+ test(ex[1].size() == 2);
+ test(ex[0][0] == Ice::Byte(0x01));
+ test(ex[1][0] == Ice::Byte(0x10));
+ test(ex[1][1] == Ice::Byte(0x11));
+ }
+
+ try
+ {
+ p->opEx(20);
+ }
+ catch(const Test::BoolVV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0].size() == 1);
+ test(ex[1].size() == 2);
+ test(ex[0][0] == true);
+ test(ex[1][0] == false);
+ test(ex[1][1] == true);
+ }
+
+ try
+ {
+ p->opEx(21);
+ }
+ catch(const Test::ShortVV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0].size() == 1);
+ test(ex[1].size() == 2);
+ test(ex[0][0] == 1);
+ test(ex[1][0] == 2);
+ test(ex[1][1] == 3);
+ }
+
+ try
+ {
+ p->opEx(22);
+ }
+ catch(const Test::IntVV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0].size() == 1);
+ test(ex[1].size() == 2);
+ test(ex[0][0] == 4);
+ test(ex[1][0] == 5);
+ test(ex[1][1] == 6);
+ }
+
+ try
+ {
+ p->opEx(23);
+ }
+ catch(const Test::LongVV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0].size() == 1);
+ test(ex[1].size() == 2);
+ test(ex[0][0] == 7);
+ test(ex[1][0] == 8);
+ test(ex[1][1] == 9);
+ }
+
+ try
+ {
+ p->opEx(24);
+ }
+ catch(const Test::FloatVV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0].size() == 1);
+ test(ex[1].size() == 2);
+ test(ex[0][0] == Ice::Float(10.10));
+ test(ex[1][0] == Ice::Float(11.11));
+ test(ex[1][1] == Ice::Float(12.12));
+ }
+
+ try
+ {
+ p->opEx(25);
+ }
+ catch(const Test::DoubleVV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0].size() == 1);
+ test(ex[1].size() == 2);
+ test(ex[0][0] == Ice::Double(13.13));
+ test(ex[1][0] == Ice::Double(14.14));
+ test(ex[1][1] == Ice::Double(15.15));
+ }
+
+ try
+ {
+ p->opEx(26);
+ }
+ catch(const Test::StringVV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0].size() == 1);
+ test(ex[1].size() == 2);
+ test(ex[0][0] == "aaa");
+ test(ex[1][0] == "bbb");
+ test(ex[1][1] == "ccc");
+ }
+
+ try
+ {
+ p->opEx(27);
+ }
+ catch(const Test::WStringVV& ex)
+ {
+ test(ex.size() == 2);
+ test(ex[0].size() == 1);
+ test(ex[1].size() == 2);
+ test(ex[0][0] == L"aaa");
+ test(ex[1][0] == L"bbb");
+ test(ex[1][1] == L"ccc");
+ }
+
+ try
+ {
+ p->opEx(28);
+ }
+ catch(const Test::MyClassPrxE& ex)
+ {
+ test(ex == p);
+ ex->opVoid();
+ }
+
+}
diff --git a/cpp/test/Ice/operations/Makefile b/cpp/test/Ice/operations/Makefile
new file mode 100644
index 00000000000..9684914f0bb
--- /dev/null
+++ b/cpp/test/Ice/operations/Makefile
@@ -0,0 +1,63 @@
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+CLIENT = client
+SERVER = server
+COLLOCATED = collocated
+
+TARGETS = $(CLIENT) $(SERVER) $(COLLOCATED)
+
+OBJS = Test.o \
+
+COBJS = Client.o \
+ AllTests.o \
+ Twoways.o \
+ Exceptions.o
+
+SOBJS = TestI.o \
+ Server.o
+
+COLOBJS = TestI.o \
+ Collocated.o \
+ AllTests.o \
+ Twoways.o \
+ Exceptions.o
+
+SRCS = $(OBJS:.o=.cpp) \
+ $(COBJS:.o=.cpp) \
+ $(SOBJS:.o=.cpp) \
+ $(COLOBJS:.o=.cpp)
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+
+$(CLIENT): $(OBJS) $(COBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COBJS) $(LIBS)
+
+$(SERVER): $(OBJS) $(SOBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(SOBJS) $(LIBS)
+
+$(COLLOCATED): $(OBJS) $(COLOBJS)
+ rm -f $@
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJS) $(COLOBJS) $(LIBS)
+
+Test.h Test.cpp: Test.ice $(SLICE)
+ rm -f Test.h Test.cpp
+ $(SLICE) Test.ice
+
+clean::
+ rm -f Test.h Test.cpp
+
+include .depend
diff --git a/cpp/test/Ice/operations/Server.cpp b/cpp/test/Ice/operations/Server.cpp
new file mode 100644
index 00000000000..1d0c8526de3
--- /dev/null
+++ b/cpp/test/Ice/operations/Server.cpp
@@ -0,0 +1,85 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+using namespace std;
+
+void
+usage(const char* n)
+{
+ cerr << "Usage: " << n << " [--pid]\n";
+}
+
+int
+run(int argc, char* argv[], Ice::CommunicatorPtr communicator)
+{
+ bool pid = false;
+ for (int i = 1; i < argc; ++i)
+ {
+ if(strcmp(argv[i], "--pid") == 0)
+ {
+ pid = true;
+ }
+ else
+ {
+ cerr << argv[0] << ": unknown option `" << argv[i] << "'" << endl;
+ usage(argv[0]);
+ return EXIT_FAILURE;
+ }
+ }
+
+ string endpts("tcp -p 12345 -t 2000");
+ Ice::ObjectAdapterPtr adapter = communicator -> createObjectAdapterWithEndpoints("testadapter", endpts);
+ Ice::ObjectPtr object = new MyDerivedClassI(adapter);
+ adapter->add(object, "test");
+ adapter->activate();
+ if (pid)
+ {
+ cout << getpid() << endl;
+ }
+ communicator->waitForShutdown();
+ return EXIT_SUCCESS;
+}
+
+int
+main(int argc, char* argv[])
+{
+ int status;
+ Ice::CommunicatorPtr communicator;
+
+ try
+ {
+ communicator = Ice::initialize(argc, argv);
+ status = run(argc, argv, communicator);
+
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/operations/Test.ice b/cpp/test/Ice/operations/Test.ice
new file mode 100644
index 00000000000..57a6aff81a7
--- /dev/null
+++ b/cpp/test/Ice/operations/Test.ice
@@ -0,0 +1,159 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_ICE
+#define TEST_ICE
+
+module Test
+{
+
+enum MyEnum
+{
+ enum1,
+ enum2,
+ enum3
+};
+
+class MyClass;
+
+vector<byte> ByteV;
+vector<bool> BoolV;
+vector<short> ShortV;
+vector<int> IntV;
+vector<long> LongV;
+vector<float> FloatV;
+vector<double> DoubleV;
+vector<string> StringV;
+vector<wstring> WStringV;
+vector<MyEnum> MyEnumV;
+vector<MyClass*> MyClassV;
+
+vector<ByteV> ByteVV;
+vector<BoolV> BoolVV;
+vector<ShortV> ShortVV;
+vector<IntV> IntVV;
+vector<LongV> LongVV;
+vector<FloatV> FloatVV;
+vector<DoubleV> DoubleVV;
+vector<StringV> StringVV;
+vector<WStringV> WStringVV;
+vector<MyEnumV> MyEnumVV;
+vector<MyClassV> MyClassVV;
+
+class MyClass
+{
+ void shutdown();
+
+ void opVoid();
+
+ byte opByte(byte p1, byte p2;
+ byte p3);
+
+ bool opBool(bool p1, bool p2;
+ bool p3);
+
+ long opShortIntLong(short p1, int p2, long p3;
+ short p4, int p5, long p6);
+
+ double opFloatDouble(float p1, double p2;
+ float p3, double p4);
+
+ string opString(string p1, string p2;
+ string p3);
+
+ wstring opWString(wstring p1, wstring p2;
+ wstring p3);
+
+ MyEnum opMyEnum(MyEnum p1; MyEnum p2);
+
+ MyClass* opMyClass(MyClass* p1; MyClass* p2);
+
+ ByteV opByteV(ByteV p1, ByteV p2;
+ ByteV p3);
+
+ BoolV opBoolV(BoolV p1, BoolV p2;
+ BoolV p3);
+
+ LongV opShortIntLongV(Test::ShortV p1, IntV p2, LongV p3;
+ ::Test::ShortV p4, IntV p5, LongV p6);
+
+ DoubleV opFloatDoubleV(FloatV p1, DoubleV p2;
+ FloatV p3, DoubleV p4);
+
+ StringV opStringV(StringV p1, StringV p2;
+ StringV p3);
+
+ WStringV opWStringV(WStringV p1, WStringV p2;
+ WStringV p3);
+
+ ByteVV opByteVV(ByteVV p1, ByteVV p2;
+ ByteVV p3);
+
+ BoolVV opBoolVV(BoolVV p1, BoolVV p2;
+ BoolVV p3);
+
+ LongVV opShortIntLongVV(ShortVV p1, IntVV p2, LongVV p3;
+ ShortVV p4, IntVV p5, LongVV p6);
+
+
+ DoubleVV opFloatDoubleVV(FloatVV p1, DoubleVV p2;
+ FloatVV p3, DoubleVV p4);
+
+ StringVV opStringVV(StringVV p1, StringVV p2;
+ StringVV p3);
+
+ WStringVV opWStringVV(WStringVV p1, WStringVV p2;
+ WStringVV p3);
+
+ void opEx(int p) throws byte, bool, short, int, long, float, double,
+ string, wstring, ByteV, BoolV, ShortV, IntV, LongV, FloatV, DoubleV,
+ StringV, WStringV, ByteVV, BoolVV, ShortVV, IntVV, LongVV, FloatVV,
+ DoubleVV, StringVV, WStringVV, MyClass*;
+
+/*
+ bool bool_;
+ short short_;
+ int int_;
+ long long_;
+ float float_;
+ double double_;
+ string string_;
+ wstring wstring_;
+
+ ByteV ByteV_;
+ BoolV BoolV_;
+ ShortV ShortV_;
+ IntV IntV_;
+ LongV LongV_;
+ FloatV FloatV_;
+ DoubleV DoubleV_;
+ StringV StringV_;
+ WStringV WStringV_;
+
+ ByteVV ByteVV_;
+ BoolVV BoolVV_;
+ ShortVV ShortVV_;
+ IntVV IntVV_;
+ LongVV LongVV_;
+ FloatVV FloatVV_;
+ DoubleVV DoubleVV_;
+ StringVV StringVV_;
+ WStringVV WStringVV_;
+*/
+};
+
+class MyDerivedClass extends MyClass
+{
+ void opDerived();
+};
+
+};
+
+#endif
diff --git a/cpp/test/Ice/operations/TestI.cpp b/cpp/test/Ice/operations/TestI.cpp
new file mode 100644
index 00000000000..f2a55800a3f
--- /dev/null
+++ b/cpp/test/Ice/operations/TestI.cpp
@@ -0,0 +1,524 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+MyDerivedClassI::MyDerivedClassI(const Ice::ObjectAdapterPtr& adapter) :
+ _adapter(adapter)
+{
+}
+
+void
+MyDerivedClassI::shutdown()
+{
+ _adapter->getCommunicator()->shutdown();
+}
+
+void
+MyDerivedClassI::opVoid()
+{
+}
+
+Ice::Byte
+MyDerivedClassI::opByte(Ice::Byte p1,
+ Ice::Byte p2,
+ Ice::Byte& p3)
+{
+ p3 = p1 ^ p2;
+ return p1;
+}
+
+bool
+MyDerivedClassI::opBool(bool p1,
+ bool p2,
+ bool& p3)
+{
+ p3 = p1;
+ return p2;
+}
+
+Ice::Long
+MyDerivedClassI::opShortIntLong(Ice::Short p1,
+ Ice::Int p2,
+ Ice::Long p3,
+ Ice::Short& p4,
+ Ice::Int& p5,
+ Ice::Long& p6)
+{
+ p4 = p1;
+ p5 = p2;
+ p6 = p3;
+ return p3;
+}
+
+Ice::Double
+MyDerivedClassI::opFloatDouble(Ice::Float p1,
+ Ice::Double p2,
+ Ice::Float& p3,
+ Ice::Double& p4)
+{
+ p3 = p1;
+ p4 = p2;
+ return p2;
+}
+
+std::string
+MyDerivedClassI::opString(const std::string& p1,
+ const std::string& p2,
+ std::string& p3)
+{
+ p3 = p2 + " " + p1;
+ return p1 + " " + p2;
+}
+
+std::wstring
+MyDerivedClassI::opWString(const std::wstring& p1,
+ const std::wstring& p2,
+ std::wstring& p3)
+{
+ p3 = p2 + L" " + p1;
+ return p1 + L" " + p2;
+}
+
+Test::MyEnum
+MyDerivedClassI::opMyEnum(Test::MyEnum p1,
+ Test::MyEnum& p2)
+{
+ p2 = p1;
+ return Test::enum3;
+}
+
+Test::MyClassPrx
+MyDerivedClassI::opMyClass(const Test::MyClassPrx& p1,
+ Test::MyClassPrx& p2)
+{
+ p2 = p1;
+ return Test::MyClassPrx::uncheckedCast(_adapter->objectToProxy(this));
+}
+
+Test::ByteV
+MyDerivedClassI::opByteV(const Test::ByteV& p1,
+ const Test::ByteV& p2,
+ Test::ByteV& p3)
+{
+ p3.resize(p1.size());
+ std::reverse_copy(p1.begin(), p1.end(), p3.begin());
+ Test::ByteV r = p1;
+ std::copy(p2.begin(), p2.end(), std::back_inserter(r));
+ return r;
+}
+
+Test::BoolV
+MyDerivedClassI::opBoolV(const Test::BoolV& p1,
+ const Test::BoolV& p2,
+ Test::BoolV& p3)
+{
+ p3 = p1;
+ std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
+ Test::BoolV r;
+ r.resize(p1.size());
+ std::reverse_copy(p1.begin(), p1.end(), r.begin());
+ return r;
+}
+
+Test::LongV
+MyDerivedClassI::opShortIntLongV(const Test::ShortV& p1,
+ const Test::IntV& p2,
+ const Test::LongV& p3,
+ Test::ShortV& p4,
+ Test::IntV& p5,
+ Test::LongV& p6)
+{
+ p4 = p1;
+ p5.resize(p2.size());
+ std::reverse_copy(p2.begin(), p2.end(), p5.begin());
+ p6 = p3;
+ std::copy(p3.begin(), p3.end(), std::back_inserter(p6));
+ return p3;
+}
+
+Test::DoubleV
+MyDerivedClassI::opFloatDoubleV(const Test::FloatV& p1,
+ const Test::DoubleV& p2,
+ Test::FloatV& p3,
+ Test::DoubleV& p4)
+{
+ p3 = p1;
+ p4.resize(p2.size());
+ std::reverse_copy(p2.begin(), p2.end(), p4.begin());
+ Test::DoubleV r = p2;
+ std::copy(p1.begin(), p1.end(), std::back_inserter(r));
+ return r;
+}
+
+Test::StringV
+MyDerivedClassI::opStringV(const Test::StringV& p1,
+ const Test::StringV& p2,
+ Test::StringV& p3)
+{
+ p3 = p1;
+ std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
+ Test::StringV r;
+ r.resize(p1.size());
+ std::reverse_copy(p1.begin(), p1.end(), r.begin());
+ return r;
+}
+
+Test::WStringV
+MyDerivedClassI::opWStringV(const Test::WStringV& p1,
+ const Test::WStringV& p2,
+ Test::WStringV& p3)
+{
+ p3 = p1;
+ std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
+ Test::WStringV r;
+ r.resize(p1.size());
+ std::reverse_copy(p1.begin(), p1.end(), r.begin());
+ return r;
+}
+
+Test::ByteVV
+MyDerivedClassI::opByteVV(const Test::ByteVV& p1,
+ const Test::ByteVV& p2,
+ Test::ByteVV& p3)
+{
+ p3.resize(p1.size());
+ std::reverse_copy(p1.begin(), p1.end(), p3.begin());
+ Test::ByteVV r = p1;
+ std::copy(p2.begin(), p2.end(), std::back_inserter(r));
+ return r;
+}
+
+Test::BoolVV
+MyDerivedClassI::opBoolVV(const Test::BoolVV& p1,
+ const Test::BoolVV& p2,
+ Test::BoolVV& p3)
+{
+ p3 = p1;
+ std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
+ Test::BoolVV r;
+ r.resize(p1.size());
+ std::reverse_copy(p1.begin(), p1.end(), r.begin());
+ return r;
+}
+
+Test::LongVV
+MyDerivedClassI::opShortIntLongVV(const Test::ShortVV& p1,
+ const Test::IntVV& p2,
+ const Test::LongVV& p3,
+ Test::ShortVV& p4,
+ Test::IntVV& p5,
+ Test::LongVV& p6)
+{
+ p4 = p1;
+ p5.resize(p2.size());
+ std::reverse_copy(p2.begin(), p2.end(), p5.begin());
+ p6 = p3;
+ std::copy(p3.begin(), p3.end(), std::back_inserter(p6));
+ return p3;
+}
+
+Test::DoubleVV
+MyDerivedClassI::opFloatDoubleVV(const Test::FloatVV& p1,
+ const Test::DoubleVV& p2,
+ Test::FloatVV& p3,
+ Test::DoubleVV& p4)
+{
+ p3 = p1;
+ p4.resize(p2.size());
+ std::reverse_copy(p2.begin(), p2.end(), p4.begin());
+ Test::DoubleVV r = p2;
+ std::copy(p2.begin(), p2.end(), std::back_inserter(r));
+ return r;
+}
+
+Test::StringVV
+MyDerivedClassI::opStringVV(const Test::StringVV& p1,
+ const Test::StringVV& p2,
+ Test::StringVV& p3)
+{
+ p3 = p1;
+ std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
+ Test::StringVV r;
+ r.resize(p2.size());
+ std::reverse_copy(p2.begin(), p2.end(), r.begin());
+ return r;
+}
+
+Test::WStringVV
+MyDerivedClassI::opWStringVV(const Test::WStringVV& p1,
+ const Test::WStringVV& p2,
+ Test::WStringVV& p3)
+{
+ p3 = p1;
+ std::copy(p2.begin(), p2.end(), std::back_inserter(p3));
+ Test::WStringVV r;
+ r.resize(p2.size());
+ std::reverse_copy(p2.begin(), p2.end(), r.begin());
+ return r;
+}
+
+void
+MyDerivedClassI::opEx(Ice::Int p)
+{
+ switch (p)
+ {
+ case 0:
+ {
+ break;
+ }
+
+ case 1:
+ {
+ throw Ice::Byte(0x1f);
+ }
+
+ case 2:
+ {
+ throw bool(true);
+ }
+
+ case 3:
+ {
+ throw Ice::Short(123);
+ }
+
+ case 4:
+ {
+ throw Ice::Int(456);
+ }
+
+ case 5:
+ {
+ throw Ice::Long(789);
+ }
+
+ case 6:
+ {
+ throw Ice::Float(10.1112);
+ }
+
+ case 7:
+ {
+ throw Ice::Double(13.1415);
+ }
+
+ case 8:
+ {
+ throw std::string("abc");
+ }
+
+ case 9:
+ {
+ throw std::wstring(L"def");
+ }
+
+ case 10:
+ {
+ Test::ByteV ex;
+ ex.push_back(Ice::Byte(0x0f));
+ ex.push_back(Ice::Byte(0xf0));
+ throw ex;
+ }
+
+ case 11:
+ {
+ Test::BoolV ex;
+ ex.push_back(true);
+ ex.push_back(false);
+ throw ex;
+ }
+
+ case 12:
+ {
+ Test::ShortV ex;
+ ex.push_back(1);
+ ex.push_back(2);
+ throw ex;
+ }
+
+ case 13:
+ {
+ Test::IntV ex;
+ ex.push_back(3);
+ ex.push_back(4);
+ throw ex;
+ }
+
+ case 14:
+ {
+ Test::LongV ex;
+ ex.push_back(5);
+ ex.push_back(6);
+ throw ex;
+ }
+
+ case 15:
+ {
+ Test::FloatV ex;
+ ex.push_back(Ice::Float(7.7));
+ ex.push_back(Ice::Float(8.8));
+ throw ex;
+ }
+
+ case 16:
+ {
+ Test::DoubleV ex;
+ ex.push_back(Ice::Double(9.9));
+ ex.push_back(Ice::Double(10.10));
+ throw ex;
+ }
+
+ case 17:
+ {
+ Test::StringV ex;
+ ex.push_back("abc");
+ ex.push_back("def");
+ throw ex;
+ }
+
+ case 18:
+ {
+ Test::WStringV ex;
+ ex.push_back(L"xxx");
+ ex.push_back(L"XXX");
+ throw ex;
+ }
+
+ case 19:
+ {
+ Test::ByteV v1;
+ Test::ByteV v2;
+ v1.push_back(Ice::Byte(0x01));
+ v2.push_back(Ice::Byte(0x10));
+ v2.push_back(Ice::Byte(0x11));
+ Test::ByteVV ex;
+ ex.push_back(v1);
+ ex.push_back(v2);
+ throw ex;
+ }
+
+ case 20:
+ {
+ Test::BoolV v1;
+ Test::BoolV v2;
+ v1.push_back(true);
+ v2.push_back(false);
+ v2.push_back(true);
+ Test::BoolVV ex;
+ ex.push_back(v1);
+ ex.push_back(v2);
+ throw ex;
+ }
+
+ case 21:
+ {
+ Test::ShortV v1;
+ Test::ShortV v2;
+ v1.push_back(1);
+ v2.push_back(2);
+ v2.push_back(3);
+ Test::ShortVV ex;
+ ex.push_back(v1);
+ ex.push_back(v2);
+ throw ex;
+ }
+
+ case 22:
+ {
+ Test::IntV v1;
+ Test::IntV v2;
+ v1.push_back(4);
+ v2.push_back(5);
+ v2.push_back(6);
+ Test::IntVV ex;
+ ex.push_back(v1);
+ ex.push_back(v2);
+ throw ex;
+ }
+
+ case 23:
+ {
+ Test::LongV v1;
+ Test::LongV v2;
+ v1.push_back(7);
+ v2.push_back(8);
+ v2.push_back(9);
+ Test::LongVV ex;
+ ex.push_back(v1);
+ ex.push_back(v2);
+ throw ex;
+ }
+
+ case 24:
+ {
+ Test::FloatV v1;
+ Test::FloatV v2;
+ v1.push_back(Ice::Float(10.10));
+ v2.push_back(Ice::Float(11.11));
+ v2.push_back(Ice::Float(12.12));
+ Test::FloatVV ex;
+ ex.push_back(v1);
+ ex.push_back(v2);
+ throw ex;
+ }
+
+ case 25:
+ {
+ Test::DoubleV v1;
+ Test::DoubleV v2;
+ v1.push_back(Ice::Double(13.13));
+ v2.push_back(Ice::Double(14.14));
+ v2.push_back(Ice::Double(15.15));
+ Test::DoubleVV ex;
+ ex.push_back(v1);
+ ex.push_back(v2);
+ throw ex;
+ }
+
+ case 26:
+ {
+ Test::StringV v1;
+ Test::StringV v2;
+ v1.push_back("aaa");
+ v2.push_back("bbb");
+ v2.push_back("ccc");
+ Test::StringVV ex;
+ ex.push_back(v1);
+ ex.push_back(v2);
+ throw ex;
+ }
+
+ case 27:
+ {
+ Test::WStringV v1;
+ Test::WStringV v2;
+ v1.push_back(L"aaa");
+ v2.push_back(L"bbb");
+ v2.push_back(L"ccc");
+ Test::WStringVV ex;
+ ex.push_back(v1);
+ ex.push_back(v2);
+ throw ex;
+ }
+
+ case 28:
+ {
+ Test::MyClassPrx p = Test::MyClassPrx::uncheckedCast(_adapter->objectToProxy(this));
+ p->_throw();
+ }
+ }
+}
+
+void
+MyDerivedClassI::opDerived()
+{
+};
diff --git a/cpp/test/Ice/operations/TestI.h b/cpp/test/Ice/operations/TestI.h
new file mode 100644
index 00000000000..0ac00a69816
--- /dev/null
+++ b/cpp/test/Ice/operations/TestI.h
@@ -0,0 +1,125 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_I_H
+#define TEST_I_H
+
+#include <Test.h>
+
+class MyDerivedClassI : public Test::MyDerivedClass
+{
+public:
+
+ MyDerivedClassI(const Ice::ObjectAdapterPtr&);
+
+ virtual void shutdown();
+
+ virtual void opVoid();
+
+ virtual Ice::Byte opByte(Ice::Byte,
+ Ice::Byte,
+ Ice::Byte&);
+
+ virtual bool opBool(bool,
+ bool,
+ bool&);
+
+ virtual Ice::Long opShortIntLong(Ice::Short,
+ Ice::Int,
+ Ice::Long,
+ Ice::Short&,
+ Ice::Int&,
+ Ice::Long&);
+
+ virtual Ice::Double opFloatDouble(Ice::Float,
+ Ice::Double,
+ Ice::Float&,
+ Ice::Double&);
+
+ virtual std::string opString(const std::string&,
+ const std::string&,
+ std::string&);
+
+ virtual std::wstring opWString(const std::wstring&,
+ const std::wstring&,
+ std::wstring&);
+
+ virtual Test::MyEnum opMyEnum(Test::MyEnum,
+ Test::MyEnum&);
+
+ virtual Test::MyClassPrx opMyClass(const Test::MyClassPrx&,
+ Test::MyClassPrx&);
+
+ virtual Test::ByteV opByteV(const Test::ByteV&,
+ const Test::ByteV&,
+ Test::ByteV&);
+
+ virtual Test::BoolV opBoolV(const Test::BoolV&,
+ const Test::BoolV&,
+ Test::BoolV&);
+
+ virtual Test::LongV opShortIntLongV(const Test::ShortV&,
+ const Test::IntV&,
+ const Test::LongV&,
+ Test::ShortV&,
+ Test::IntV&,
+ Test::LongV&);
+
+ virtual Test::DoubleV opFloatDoubleV(const Test::FloatV&,
+ const Test::DoubleV&,
+ Test::FloatV&,
+ Test::DoubleV&);
+
+ virtual Test::StringV opStringV(const Test::StringV&,
+ const Test::StringV&,
+ Test::StringV&);
+
+ virtual Test::WStringV opWStringV(const Test::WStringV&,
+ const Test::WStringV&,
+ Test::WStringV&);
+
+ virtual Test::ByteVV opByteVV(const Test::ByteVV&,
+ const Test::ByteVV&,
+ Test::ByteVV&);
+
+ virtual Test::BoolVV opBoolVV(const Test::BoolVV&,
+ const Test::BoolVV&,
+ Test::BoolVV&);
+
+ virtual Test::LongVV opShortIntLongVV(const Test::ShortVV&,
+ const Test::IntVV&,
+ const Test::LongVV&,
+ Test::ShortVV&,
+ Test::IntVV&,
+ Test::LongVV&);
+
+ virtual Test::DoubleVV opFloatDoubleVV(const Test::FloatVV&,
+ const Test::DoubleVV&,
+ Test::FloatVV&,
+ Test::DoubleVV&);
+
+ virtual Test::StringVV opStringVV(const Test::StringVV&,
+ const Test::StringVV&,
+ Test::StringVV&);
+
+ virtual Test::WStringVV opWStringVV(const Test::WStringVV&,
+ const Test::WStringVV&,
+ Test::WStringVV&);
+
+ virtual void opEx(Ice::Int);
+
+ virtual void opDerived();
+
+private:
+
+ Ice::ObjectAdapterPtr _adapter;
+};
+
+#endif
diff --git a/cpp/test/Ice/operations/Twoways.cpp b/cpp/test/Ice/operations/Twoways.cpp
new file mode 100644
index 00000000000..015199cb7ee
--- /dev/null
+++ b/cpp/test/Ice/operations/Twoways.cpp
@@ -0,0 +1,475 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+#include <limits>
+
+//
+// Stupid Visual C++ defines min and max as macros :-(
+//
+#ifdef min
+# undef min
+#endif
+#ifdef max
+# undef max
+#endif
+
+using namespace std;
+
+void
+twoways(Test::MyClassPrx p)
+{
+ {
+ p->opVoid();
+ }
+
+ {
+ Ice::Byte b;
+ Ice::Byte r;
+
+ r = p->opByte(Ice::Byte(0xff), Ice::Byte(0x0f), b);
+ test(b == Ice::Byte(0xf0));
+ test(r == Ice::Byte(0xff));
+ }
+
+ {
+ bool b;
+ bool r;
+
+ r = p->opBool(true, false, b);
+ test(b);
+ test(!r);
+ }
+
+ {
+ Ice::Short s;
+ Ice::Int i;
+ Ice::Long l;
+ Ice::Long r;
+
+ r = p->opShortIntLong(10, 11, 12, s, i, l);
+ test(s == 10);
+ test(i == 11);
+ test(l == 12);
+ test(r == 12);
+
+ r = p->opShortIntLong(numeric_limits<Ice::Short>::min(), numeric_limits<Ice::Int>::min(),
+ numeric_limits<Ice::Long>::min(), s, i, l);
+ test(s == numeric_limits<Ice::Short>::min());
+ test(i == numeric_limits<Ice::Int>::min());
+ test(l == numeric_limits<Ice::Long>::min());
+ test(r == numeric_limits<Ice::Long>::min());
+
+ r = p->opShortIntLong(numeric_limits<Ice::Short>::max(), numeric_limits<Ice::Int>::max(),
+ numeric_limits<Ice::Long>::max(), s, i, l);
+ test(s == numeric_limits<Ice::Short>::max());
+ test(i == numeric_limits<Ice::Int>::max());
+ test(l == numeric_limits<Ice::Long>::max());
+ test(r == numeric_limits<Ice::Long>::max());
+ }
+
+ {
+ Ice::Float f;
+ Ice::Double d;
+ Ice::Double r;
+
+ r = p->opFloatDouble(Ice::Float(3.14), Ice::Double(1.1E10), f, d);
+ test(f == Ice::Float(3.14));
+ test(d == Ice::Double(1.1E10));
+ test(r == Ice::Double(1.1E10));
+
+ r = p->opFloatDouble(numeric_limits<Ice::Float>::min(), numeric_limits<Ice::Double>::min(), f, d);
+ test(f == numeric_limits<Ice::Float>::min());
+ test(d == numeric_limits<Ice::Double>::min());
+ test(r == numeric_limits<Ice::Double>::min());
+
+ r = p->opFloatDouble(numeric_limits<Ice::Float>::max(), numeric_limits<Ice::Double>::max(), f, d);
+ test(f == numeric_limits<Ice::Float>::max());
+ test(d == numeric_limits<Ice::Double>::max());
+ test(r == numeric_limits<Ice::Double>::max());
+ }
+
+ {
+ string s;
+ string r;
+
+ r = p->opString("hello", "world", s);
+ test(s == "world hello");
+ test(r == "hello world");
+ }
+
+ {
+ wstring s;
+ wstring r;
+
+ r = p->opWString(L"hello", L"world", s);
+ test(s == L"world hello");
+ test(r == L"hello world");
+ }
+
+ {
+ Test::MyEnum e;
+ Test::MyEnum r;
+
+ r = p->opMyEnum(Test::enum2, e);
+ test(e == Test::enum2);
+ test(r == Test::enum3);
+ }
+
+ {
+ Test::MyClassPrx c;
+ Test::MyClassPrx r;
+
+ r = p->opMyClass(p, c);
+ test(c == p);
+ test(r == p);
+ c->opVoid();
+ r->opVoid();
+
+ r = p->opMyClass(0, c);
+ test(c == 0);
+ test(r == p);
+ r->opVoid();
+ }
+
+ {
+ Test::ByteV bvi1;
+ Test::ByteV bvi2;
+
+ bvi1.push_back(Ice::Byte(0x01));
+ bvi1.push_back(Ice::Byte(0x11));
+ bvi1.push_back(Ice::Byte(0x12));
+ bvi1.push_back(Ice::Byte(0x22));
+
+ bvi2.push_back(Ice::Byte(0xf1));
+ bvi2.push_back(Ice::Byte(0xf2));
+ bvi2.push_back(Ice::Byte(0xf3));
+ bvi2.push_back(Ice::Byte(0xf4));
+
+ Test::ByteV bvo;
+ Test::ByteV rvo;
+
+ rvo = p->opByteV(bvi1, bvi2, bvo);
+ test(bvo.size() == 4);
+ test(bvo[0] == Ice::Byte(0x22));
+ test(bvo[1] == Ice::Byte(0x12));
+ test(bvo[2] == Ice::Byte(0x11));
+ test(bvo[3] == Ice::Byte(0x01));
+ test(rvo.size() == 8);
+ test(rvo[0] == Ice::Byte(0x01));
+ test(rvo[1] == Ice::Byte(0x11));
+ test(rvo[2] == Ice::Byte(0x12));
+ test(rvo[3] == Ice::Byte(0x22));
+ test(rvo[4] == Ice::Byte(0xf1));
+ test(rvo[5] == Ice::Byte(0xf2));
+ test(rvo[6] == Ice::Byte(0xf3));
+ test(rvo[7] == Ice::Byte(0xf4));
+ }
+
+ {
+ Test::BoolV bvi1;
+ Test::BoolV bvi2;
+
+ bvi1.push_back(true);
+ bvi1.push_back(true);
+ bvi1.push_back(false);
+
+ bvi2.push_back(false);
+
+ Test::BoolV bvo;
+ Test::BoolV rvo;
+
+ rvo = p->opBoolV(bvi1, bvi2, bvo);
+ test(bvo.size() == 4);
+ test(bvo[0]);
+ test(bvo[1]);
+ test(!bvo[2]);
+ test(!bvo[3]);
+ test(rvo.size() == 3);
+ test(!rvo[0]);
+ test(rvo[1]);
+ test(rvo[2]);
+ }
+
+ {
+ Test::ShortV svi;
+ Test::IntV ivi;
+ Test::LongV lvi;
+
+ svi.push_back(1);
+ svi.push_back(2);
+ svi.push_back(3);
+
+ ivi.push_back(5);
+ ivi.push_back(6);
+ ivi.push_back(7);
+ ivi.push_back(8);
+
+ lvi.push_back(10);
+ lvi.push_back(30);
+ lvi.push_back(20);
+
+ Test::ShortV svo;
+ Test::IntV ivo;
+ Test::LongV lvo;
+ Test::LongV rvo;
+
+ rvo = p->opShortIntLongV(svi, ivi, lvi, svo, ivo, lvo);
+ test(svo.size() == 3);
+ test(svo[0] == 1);
+ test(svo[1] == 2);
+ test(svo[2] == 3);
+ test(ivo.size() == 4);
+ test(ivo[0] == 8);
+ test(ivo[1] == 7);
+ test(ivo[2] == 6);
+ test(ivo[3] == 5);
+ test(lvo.size() == 6);
+ test(lvo[0] == 10);
+ test(lvo[1] == 30);
+ test(lvo[2] == 20);
+ test(lvo[3] == 10);
+ test(lvo[4] == 30);
+ test(lvo[5] == 20);
+ test(rvo.size() == 3);
+ test(rvo[0] == 10);
+ test(rvo[1] == 30);
+ test(rvo[2] == 20);
+ }
+
+ {
+ Test::FloatV fvi;
+ Test::DoubleV dvi;
+
+ fvi.push_back(Ice::Float(3.14));
+ fvi.push_back(Ice::Float(1.11));
+
+ dvi.push_back(Ice::Double(1.1E10));
+ dvi.push_back(Ice::Double(1.2E10));
+ dvi.push_back(Ice::Double(1.3E10));
+
+ Test::FloatV fvo;
+ Test::DoubleV dvo;
+ Test::DoubleV rvo;
+
+ rvo = p->opFloatDoubleV(fvi, dvi, fvo, dvo);
+ test(fvo.size() == 2);
+ test(fvo[0] == ::Ice::Float(3.14));
+ test(fvo[1] == ::Ice::Float(1.11));
+ test(dvo.size() == 3);
+ test(dvo[0] == ::Ice::Double(1.3E10));
+ test(dvo[1] == ::Ice::Double(1.2E10));
+ test(dvo[2] == ::Ice::Double(1.1E10));
+ test(rvo.size() == 5);
+ test(rvo[0] == ::Ice::Double(1.1E10));
+ test(rvo[1] == ::Ice::Double(1.2E10));
+ test(rvo[2] == ::Ice::Double(1.3E10));
+ test(::Ice::Float(rvo[3]) == ::Ice::Float(3.14));
+ test(::Ice::Float(rvo[4]) == ::Ice::Float(1.11));
+ }
+
+ {
+ Test::StringV svi1;
+ Test::StringV svi2;
+
+ svi1.push_back("abc");
+ svi1.push_back("de");
+ svi1.push_back("fghi");
+
+ svi2.push_back("xyz");
+
+ Test::StringV svo;
+ Test::StringV rvo;
+
+ rvo = p->opStringV(svi1, svi2, svo);
+ test(svo.size() == 4);
+ test(svo[0] == "abc");
+ test(svo[1] == "de");
+ test(svo[2] == "fghi");
+ test(svo[3] == "xyz");
+ test(rvo.size() == 3);
+ test(rvo[0] == "fghi");
+ test(rvo[1] == "de");
+ test(rvo[2] == "abc");
+ }
+
+ {
+ Test::WStringV svi1;
+ Test::WStringV svi2;
+
+ svi1.push_back(L"abc");
+ svi1.push_back(L"de");
+ svi1.push_back(L"fghi");
+
+ svi2.push_back(L"xyz");
+
+ Test::WStringV svo;
+ Test::WStringV rvo;
+
+ rvo = p->opWStringV(svi1, svi2, svo);
+ test(svo.size() == 4);
+ test(svo[0] == L"abc");
+ test(svo[1] == L"de");
+ test(svo[2] == L"fghi");
+ test(svo[3] == L"xyz");
+ test(rvo.size() == 3);
+ test(rvo[0] == L"fghi");
+ test(rvo[1] == L"de");
+ test(rvo[2] == L"abc");
+ }
+
+ {
+ Test::ByteVV bvi1;
+ bvi1.resize(2);
+ Test::ByteVV bvi2;
+ bvi2.resize(2);
+
+ bvi1[0].push_back(Ice::Byte(0x01));
+ bvi1[0].push_back(Ice::Byte(0x11));
+ bvi1[0].push_back(Ice::Byte(0x12));
+ bvi1[1].push_back(Ice::Byte(0xff));
+
+ bvi2[0].push_back(Ice::Byte(0x0e));
+ bvi2[1].push_back(Ice::Byte(0xf2));
+ bvi2[1].push_back(Ice::Byte(0xf1));
+
+ Test::ByteVV bvo;
+ Test::ByteVV rvo;
+
+ rvo = p->opByteVV(bvi1, bvi2, bvo);
+ test(bvo.size() == 2);
+ test(bvo[0].size() == 1);
+ test(bvo[0][0] == Ice::Byte(0xff));
+ test(bvo[1].size() == 3);
+ test(bvo[1][0] == Ice::Byte(0x01));
+ test(bvo[1][1] == Ice::Byte(0x11));
+ test(bvo[1][2] == Ice::Byte(0x12));
+ test(rvo.size() == 4);
+ test(rvo[0].size() == 3);
+ test(rvo[0][0] == Ice::Byte(0x01));
+ test(rvo[0][1] == Ice::Byte(0x11));
+ test(rvo[0][2] == Ice::Byte(0x12));
+ test(rvo[1].size() == 1);
+ test(rvo[1][0] == Ice::Byte(0xff));
+ test(rvo[2].size() == 1);
+ test(rvo[2][0] == Ice::Byte(0x0e));
+ test(rvo[3].size() == 2);
+ test(rvo[3][0] == Ice::Byte(0xf2));
+ test(rvo[3][1] == Ice::Byte(0xf1));
+ }
+
+ {
+ Test::FloatVV fvi;
+ fvi.resize(3);
+ Test::DoubleVV dvi;
+ dvi.resize(1);
+
+ fvi[0].push_back(Ice::Float(3.14));
+ fvi[1].push_back(Ice::Float(1.11));
+
+ dvi[0].push_back(Ice::Double(1.1E10));
+ dvi[0].push_back(Ice::Double(1.2E10));
+ dvi[0].push_back(Ice::Double(1.3E10));
+
+ Test::FloatVV fvo;
+ Test::DoubleVV dvo;
+ Test::DoubleVV rvo;
+
+ rvo = p->opFloatDoubleVV(fvi, dvi, fvo, dvo);
+ test(fvo.size() == 3);
+ test(fvo[0].size() == 1);
+ test(fvo[0][0] == ::Ice::Float(3.14));
+ test(fvo[1].size() == 1);
+ test(fvo[1][0] == ::Ice::Float(1.11));
+ test(fvo[2].size() == 0);
+ test(dvo.size() == 1);
+ test(dvo[0].size() == 3);
+ test(dvo[0][0] == ::Ice::Double(1.1E10));
+ test(dvo[0][1] == ::Ice::Double(1.2E10));
+ test(dvo[0][2] == ::Ice::Double(1.3E10));
+ test(rvo.size() == 2);
+ test(rvo[0].size() == 3);
+ test(rvo[0][0] == ::Ice::Double(1.1E10));
+ test(rvo[0][1] == ::Ice::Double(1.2E10));
+ test(rvo[0][2] == ::Ice::Double(1.3E10));
+ test(rvo[1].size() == 3);
+ test(rvo[1][0] == ::Ice::Double(1.1E10));
+ test(rvo[1][1] == ::Ice::Double(1.2E10));
+ test(rvo[1][2] == ::Ice::Double(1.3E10));
+ }
+
+ {
+ Test::StringVV svi1;
+ svi1.resize(2);
+ Test::StringVV svi2;
+ svi2.resize(3);
+
+ svi1[0].push_back("abc");
+ svi1[1].push_back("de");
+ svi1[1].push_back("fghi");
+
+ svi2[2].push_back("xyz");
+
+ Test::StringVV svo;
+ Test::StringVV rvo;
+
+ rvo = p->opStringVV(svi1, svi2, svo);
+ test(svo.size() == 5);
+ test(svo[0].size() == 1);
+ test(svo[0][0] == "abc");
+ test(svo[1].size() == 2);
+ test(svo[1][0] == "de");
+ test(svo[1][1] == "fghi");
+ test(svo[2].size() == 0);
+ test(svo[3].size() == 0);
+ test(svo[4].size() == 1);
+ test(svo[4][0] == "xyz");
+ test(rvo.size() == 3);
+ test(rvo[0].size() == 1);
+ test(rvo[0][0] == "xyz");
+ test(rvo[1].size() == 0);
+ test(rvo[2].size() == 0);
+ }
+
+ {
+ Test::WStringVV svi1;
+ svi1.resize(2);
+ Test::WStringVV svi2;
+ svi2.resize(3);
+
+ svi1[0].push_back(L"abc");
+ svi1[1].push_back(L"de");
+ svi1[1].push_back(L"fghi");
+
+ svi2[2].push_back(L"xyz");
+
+ Test::WStringVV svo;
+ Test::WStringVV rvo;
+
+ rvo = p->opWStringVV(svi1, svi2, svo);
+ test(svo.size() == 5);
+ test(svo[0].size() == 1);
+ test(svo[0][0] == L"abc");
+ test(svo[1].size() == 2);
+ test(svo[1][0] == L"de");
+ test(svo[1][1] == L"fghi");
+ test(svo[2].size() == 0);
+ test(svo[3].size() == 0);
+ test(svo[4].size() == 1);
+ test(svo[4][0] == L"xyz");
+ test(rvo.size() == 3);
+ test(rvo[0].size() == 1);
+ test(rvo[0][0] == L"xyz");
+ test(rvo[1].size() == 0);
+ test(rvo[2].size() == 0);
+ }
+}
diff --git a/cpp/test/Ice/operations/operationsC.dsp b/cpp/test/Ice/operations/operationsC.dsp
new file mode 100644
index 00000000000..950e55b56bd
--- /dev/null
+++ b/cpp/test/Ice/operations/operationsC.dsp
@@ -0,0 +1,165 @@
+# Microsoft Developer Studio Project File - Name="operationsC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=operationsC - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "operationsC.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "operationsC.mak" CFG="operationsC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "operationsC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "operationsC - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "operationsC - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "operationsC - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "operationsC - Win32 Release"
+# Name "operationsC - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AllTests.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Client.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Exceptions.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Twoways.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "operationsC - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "operationsC - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/operations/operationsCOL.dsp b/cpp/test/Ice/operations/operationsCOL.dsp
new file mode 100644
index 00000000000..1d550a5f985
--- /dev/null
+++ b/cpp/test/Ice/operations/operationsCOL.dsp
@@ -0,0 +1,173 @@
+# Microsoft Developer Studio Project File - Name="operationsCOL" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=operationsCOL - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "operationsCOL.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "operationsCOL.mak" CFG="operationsCOL - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "operationsCOL - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "operationsCOL - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "operationsCOL - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"collocated.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "operationsCOL - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"collocated.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "operationsCOL - Win32 Release"
+# Name "operationsCOL - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\AllTests.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Collocated.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Exceptions.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Twoways.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "operationsCOL - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "operationsCOL - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/operations/operationsS.dsp b/cpp/test/Ice/operations/operationsS.dsp
new file mode 100644
index 00000000000..e85693296ca
--- /dev/null
+++ b/cpp/test/Ice/operations/operationsS.dsp
@@ -0,0 +1,161 @@
+# Microsoft Developer Studio Project File - Name="operationsS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=operationsS - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "operationsS.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "operationsS.mak" CFG="operationsS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "operationsS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "operationsS - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "operationsS - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "Release"
+# PROP Intermediate_Dir "Release"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W3 /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 jtc.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "operationsS - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "Debug"
+# PROP Intermediate_Dir "Debug"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W3 /Gm /GR /GX /ZI /Od /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /FR /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 jtcd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "operationsS - Win32 Release"
+# Name "operationsS - Win32 Debug"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\Server.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\Test.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=.\Test.h
+# End Source File
+# Begin Source File
+
+SOURCE=.\TestI.h
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# Begin Source File
+
+SOURCE=.\Test.ice
+
+!IF "$(CFG)" == "operationsS - Win32 Release"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "operationsS - Win32 Debug"
+
+USERDEP__TEST_="../../../bin/slice2cpp.exe"
+# Begin Custom Build
+InputPath=.\Test.ice
+
+BuildCmds= \
+ set PATH=%PATH%;..\..\..\lib \
+ ..\..\..\bin\slice2cpp.exe Test.ice \
+
+
+"Test.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+
+"Test.cpp" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ $(BuildCmds)
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# End Group
+# End Target
+# End Project
diff --git a/cpp/test/Ice/operations/run.py b/cpp/test/Ice/operations/run.py
new file mode 100755
index 00000000000..166c21d0430
--- /dev/null
+++ b/cpp/test/Ice/operations/run.py
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+import os, sys
+
+for toplevel in ["", "..", os.path.join("..", ".."), os.path.join("..", "..", "..")]:
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+sys.path.append(os.path.join(toplevel, "config"))
+import TestUtil
+
+name = os.path.join("Ice", "operations")
+TestUtil.clientServerTest(toplevel, name)
+TestUtil.collocatedTest(toplevel, name)
+sys.exit(1)
diff --git a/cpp/test/Makefile b/cpp/test/Makefile
index cfc3f03c0bb..0027b52197d 100644
--- a/cpp/test/Makefile
+++ b/cpp/test/Makefile
@@ -12,11 +12,7 @@ top_srcdir = ..
include $(top_srcdir)/config/Make.rules
-SUBDIRS = operations \
- inheritance \
- exceptions \
- faultTolerance \
- locationForward
+SUBDIRS = Ice
$(EVERYTHING)::
@for subdir in $(SUBDIRS); \
diff --git a/cpp/test/Slice/errorDetection/ClassRedefinition.err b/cpp/test/Slice/errorDetection/ClassRedefinition.err
new file mode 100644
index 00000000000..870a9ac4ea1
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/ClassRedefinition.err
@@ -0,0 +1,2 @@
+ClassRedefinition.ice:12 error: redefinition of class `Class1'
+ClassRedefinition.ice:16 error: redefinition of class `Class2'
diff --git a/cpp/test/Slice/errorDetection/ClassRedefinition.ice b/cpp/test/Slice/errorDetection/ClassRedefinition.ice
new file mode 100644
index 00000000000..8367e558a2c
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/ClassRedefinition.ice
@@ -0,0 +1,17 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+class Class1 { };
+class Class1 { };
+class Class1;
+
+local class Class2 { };
+local class Class2 { };
+local class Class2;
diff --git a/cpp/test/Slice/errorDetection/DataMemberRedefinition.err b/cpp/test/Slice/errorDetection/DataMemberRedefinition.err
new file mode 100644
index 00000000000..d838fc64725
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/DataMemberRedefinition.err
@@ -0,0 +1 @@
+DataMemberRedefinition.ice:14 error: redefinition of data member `member'
diff --git a/cpp/test/Slice/errorDetection/DataMemberRedefinition.ice b/cpp/test/Slice/errorDetection/DataMemberRedefinition.ice
new file mode 100644
index 00000000000..df7e400ade9
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/DataMemberRedefinition.ice
@@ -0,0 +1,15 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+class Class
+{
+ int member;
+ int member;
+};
diff --git a/cpp/test/Slice/errorDetection/EnumRedefinition.err b/cpp/test/Slice/errorDetection/EnumRedefinition.err
new file mode 100644
index 00000000000..53f84ad9bf2
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/EnumRedefinition.err
@@ -0,0 +1 @@
+EnumRedefinition.ice:12 error: redefinition of enum `Enum'
diff --git a/cpp/test/Slice/errorDetection/EnumRedefinition.ice b/cpp/test/Slice/errorDetection/EnumRedefinition.ice
new file mode 100644
index 00000000000..362556e87a2
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/EnumRedefinition.ice
@@ -0,0 +1,12 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+enum Enum { A, B, C };
+enum Enum { D, E, F };
diff --git a/cpp/test/Slice/errorDetection/EnumeratorRedefinition.err b/cpp/test/Slice/errorDetection/EnumeratorRedefinition.err
new file mode 100644
index 00000000000..0c4994e19cd
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/EnumeratorRedefinition.err
@@ -0,0 +1,2 @@
+EnumeratorRedefinition.ice:12 error: redefinition of enumerator `B'
+EnumeratorRedefinition.ice:12 error: redefinition of enumerator `A'
diff --git a/cpp/test/Slice/errorDetection/EnumeratorRedefinition.ice b/cpp/test/Slice/errorDetection/EnumeratorRedefinition.ice
new file mode 100644
index 00000000000..daed9fbf86e
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/EnumeratorRedefinition.ice
@@ -0,0 +1,12 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+enum Enum1 { A, B, C };
+enum Enum2 { A, B, E };
diff --git a/cpp/test/Slice/errorDetection/InterfaceMismatch.err b/cpp/test/Slice/errorDetection/InterfaceMismatch.err
new file mode 100644
index 00000000000..1d0c1c784bc
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/InterfaceMismatch.err
@@ -0,0 +1,6 @@
+InterfaceMismatch.ice:12 error: class `Foo1' was declared as interface
+InterfaceMismatch.ice:13 error: class `Foo1' was declared as interface
+InterfaceMismatch.ice:16 error: class `Foo2' was defined as interface
+InterfaceMismatch.ice:19 error: interface `Foo3' was declared as class
+InterfaceMismatch.ice:20 error: interface `Foo3' was declared as class
+InterfaceMismatch.ice:23 error: interface `Foo4' was defined as class
diff --git a/cpp/test/Slice/errorDetection/InterfaceMismatch.ice b/cpp/test/Slice/errorDetection/InterfaceMismatch.ice
new file mode 100644
index 00000000000..1cf75cdbbb2
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/InterfaceMismatch.ice
@@ -0,0 +1,23 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+interface Foo1;
+class Foo1;
+class Foo1 { };
+
+interface Foo2 { };
+class Foo2;
+
+class Foo3;
+interface Foo3;
+interface Foo3 { };
+
+class Foo4 { };
+interface Foo4;
diff --git a/cpp/test/Slice/errorDetection/InterfaceRedefinition.err b/cpp/test/Slice/errorDetection/InterfaceRedefinition.err
new file mode 100644
index 00000000000..9a1f2ed03ae
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/InterfaceRedefinition.err
@@ -0,0 +1,2 @@
+InterfaceRedefinition.ice:12 error: redefinition of interface `Intf1'
+InterfaceRedefinition.ice:16 error: redefinition of interface `Intf2'
diff --git a/cpp/test/Slice/errorDetection/InterfaceRedefinition.ice b/cpp/test/Slice/errorDetection/InterfaceRedefinition.ice
new file mode 100644
index 00000000000..c5f23d3660f
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/InterfaceRedefinition.ice
@@ -0,0 +1,17 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+interface Intf1 { };
+interface Intf1 { };
+interface Intf1;
+
+local interface Intf2 { };
+local interface Intf2 { };
+local interface Intf2;
diff --git a/cpp/test/Slice/errorDetection/LocalMistmatch.err b/cpp/test/Slice/errorDetection/LocalMistmatch.err
new file mode 100644
index 00000000000..7b9567b508a
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/LocalMistmatch.err
@@ -0,0 +1,12 @@
+LocalMistmatch.ice:12 error: local `Intf1' was declared non-local
+LocalMistmatch.ice:13 error: local `Intf1' was declared non-local
+LocalMistmatch.ice:16 error: local `Intf2' was defined non-local
+LocalMistmatch.ice:19 error: non-local `Intf3' was declared local
+LocalMistmatch.ice:20 error: non-local `Intf3' was declared local
+LocalMistmatch.ice:23 error: non-local `Intf4' was defined local
+LocalMistmatch.ice:26 error: local `Class1' was declared non-local
+LocalMistmatch.ice:27 error: local `Class1' was declared non-local
+LocalMistmatch.ice:30 error: local `Class2' was defined non-local
+LocalMistmatch.ice:33 error: non-local `Class3' was declared local
+LocalMistmatch.ice:34 error: non-local `Class3' was declared local
+LocalMistmatch.ice:37 error: non-local `Class4' was defined local
diff --git a/cpp/test/Slice/errorDetection/LocalMistmatch.ice b/cpp/test/Slice/errorDetection/LocalMistmatch.ice
new file mode 100644
index 00000000000..c005d18fb69
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/LocalMistmatch.ice
@@ -0,0 +1,37 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+interface Intf1;
+local interface Intf1;
+local interface Intf1 { };
+
+interface Intf2 { };
+local interface Intf2;
+
+local interface Intf3;
+interface Intf3;
+interface Intf3 { };
+
+local interface Intf4 { };
+interface Intf4;
+
+interface Class1;
+local interface Class1;
+local interface Class1 { };
+
+interface Class2 { };
+local interface Class2;
+
+local interface Class3;
+interface Class3;
+interface Class3 { };
+
+local interface Class4 { };
+interface Class4;
diff --git a/cpp/test/Slice/errorDetection/NativeRedefinition.err b/cpp/test/Slice/errorDetection/NativeRedefinition.err
new file mode 100644
index 00000000000..9ed1e3c4a1d
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/NativeRedefinition.err
@@ -0,0 +1 @@
+NativeRedefinition.ice:12 error: redefinition of native `Native'
diff --git a/cpp/test/Slice/errorDetection/NativeRedefinition.ice b/cpp/test/Slice/errorDetection/NativeRedefinition.ice
new file mode 100644
index 00000000000..cb5f2fab335
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/NativeRedefinition.ice
@@ -0,0 +1,12 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+native Native;
+native Native;
diff --git a/cpp/test/Slice/errorDetection/NotClassOrInterface.err b/cpp/test/Slice/errorDetection/NotClassOrInterface.err
new file mode 100644
index 00000000000..d48d8f62b9e
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/NotClassOrInterface.err
@@ -0,0 +1,9 @@
+NotClassOrInterface.ice:15 error: `Vector' is not an interface
+NotClassOrInterface.ice:16 error: `Vector' is not a class
+NotClassOrInterface.ice:17 error: `Vector3' is not an interface
+NotClassOrInterface.ice:17 error: `Vector2' is not an interface
+NotClassOrInterface.ice:17 error: `Vector1' is not an interface
+NotClassOrInterface.ice:18 error: `Vector' is not a class
+NotClassOrInterface.ice:18 error: `Vector3' is not an interface
+NotClassOrInterface.ice:18 error: `Vector2' is not an interface
+NotClassOrInterface.ice:18 error: `Vector1' is not an interface
diff --git a/cpp/test/Slice/errorDetection/NotClassOrInterface.ice b/cpp/test/Slice/errorDetection/NotClassOrInterface.ice
new file mode 100644
index 00000000000..61830eaf074
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/NotClassOrInterface.ice
@@ -0,0 +1,18 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+vector<int> Vector;
+vector<int> Vector1;
+vector<int> Vector2;
+vector<int> Vector3;
+interface BarIntf extends Vector { };
+class BarClass1 extends Vector { };
+class BarClass2 implements Vector1, Vector2, Vector3 { };
+class BarClass3 extends Vector implements Vector1, Vector2, Vector3 { };
diff --git a/cpp/test/Slice/errorDetection/NotType.err b/cpp/test/Slice/errorDetection/NotType.err
new file mode 100644
index 00000000000..04b37362c28
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/NotType.err
@@ -0,0 +1,10 @@
+NotType.ice:17 error: `Module' is not a type
+NotType.ice:18 error: `Module' is not a type
+NotType.ice:19 error: `Module' is not a type
+NotType.ice:20 error: `Module3' is not a type
+NotType.ice:20 error: `Module2' is not a type
+NotType.ice:20 error: `Module1' is not a type
+NotType.ice:21 error: `Module' is not a type
+NotType.ice:21 error: `Module3' is not a type
+NotType.ice:21 error: `Module2' is not a type
+NotType.ice:21 error: `Module1' is not a type
diff --git a/cpp/test/Slice/errorDetection/NotType.ice b/cpp/test/Slice/errorDetection/NotType.ice
new file mode 100644
index 00000000000..2ad86aa608e
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/NotType.ice
@@ -0,0 +1,23 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+module Module1 { };
+module Module2 { };
+module Module3 { };
+module Module
+{
+
+vector<Module> Vector;
+interface BarIntf extends Module { };
+class BarClass1 extends Module { };
+class BarClass2 implements Module1, Module2, Module3 { };
+class BarClass3 extends Module implements Module1, Module2, Module3 { };
+
+};
diff --git a/cpp/test/Slice/errorDetection/OperationRedefinition.err b/cpp/test/Slice/errorDetection/OperationRedefinition.err
new file mode 100644
index 00000000000..ef0b255726f
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/OperationRedefinition.err
@@ -0,0 +1 @@
+OperationRedefinition.ice:14 error: redefinition of operation `operation'
diff --git a/cpp/test/Slice/errorDetection/OperationRedefinition.ice b/cpp/test/Slice/errorDetection/OperationRedefinition.ice
new file mode 100644
index 00000000000..07d4cca3a83
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/OperationRedefinition.ice
@@ -0,0 +1,15 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+class Class
+{
+ void operation();
+ void operation();
+};
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsClass.err b/cpp/test/Slice/errorDetection/RedefinitionAsClass.err
new file mode 100644
index 00000000000..c99fb95e30d
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsClass.err
@@ -0,0 +1,2 @@
+RedefinitionAsClass.ice:12 error: declaration of already defined `Vector1' as class
+RedefinitionAsClass.ice:15 error: redefinition of `Vector2' as class
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsClass.ice b/cpp/test/Slice/errorDetection/RedefinitionAsClass.ice
new file mode 100644
index 00000000000..5835e1ae3a9
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsClass.ice
@@ -0,0 +1,15 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+vector<int> Vector1;
+class Vector1;
+
+vector<int> Vector2;
+class Vector2 { };
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsDataMember.err b/cpp/test/Slice/errorDetection/RedefinitionAsDataMember.err
new file mode 100644
index 00000000000..fe1a425c543
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsDataMember.err
@@ -0,0 +1 @@
+RedefinitionAsDataMember.ice:14 error: redefinition of `operation' as data member
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsDataMember.ice b/cpp/test/Slice/errorDetection/RedefinitionAsDataMember.ice
new file mode 100644
index 00000000000..db7ae798417
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsDataMember.ice
@@ -0,0 +1,15 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+class Class
+{
+ void operation();
+ int operation;
+};
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsEnum.err b/cpp/test/Slice/errorDetection/RedefinitionAsEnum.err
new file mode 100644
index 00000000000..4abeb75e4d8
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsEnum.err
@@ -0,0 +1 @@
+RedefinitionAsEnum.ice:12 error: redefinition of `Class' as enum
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsEnum.ice b/cpp/test/Slice/errorDetection/RedefinitionAsEnum.ice
new file mode 100644
index 00000000000..9029f93e434
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsEnum.ice
@@ -0,0 +1,12 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+class Class { };
+enum Class { A, B, C };
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.err b/cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.err
new file mode 100644
index 00000000000..9445f69c0d2
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.err
@@ -0,0 +1,2 @@
+RedefinitionAsEnumerator.ice:13 error: redefinition of `Vector' as enumerator
+RedefinitionAsEnumerator.ice:13 error: redefinition of `Class' as enumerator
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.ice b/cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.ice
new file mode 100644
index 00000000000..97f3ff85dbe
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsEnumerator.ice
@@ -0,0 +1,13 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+class Class { };
+vector<int> Vector;
+enum Enum { Class, Vector };
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsInterface.err b/cpp/test/Slice/errorDetection/RedefinitionAsInterface.err
new file mode 100644
index 00000000000..7bdb8dfecb0
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsInterface.err
@@ -0,0 +1,2 @@
+RedefinitionAsInterface.ice:12 error: declaration of already defined `Vector1' as interface
+RedefinitionAsInterface.ice:15 error: redefinition of `Vector2' as interface
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsInterface.ice b/cpp/test/Slice/errorDetection/RedefinitionAsInterface.ice
new file mode 100644
index 00000000000..b8041e946c1
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsInterface.ice
@@ -0,0 +1,15 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+vector<int> Vector1;
+interface Vector1;
+
+vector<int> Vector2;
+interface Vector2 { };
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsModule.err b/cpp/test/Slice/errorDetection/RedefinitionAsModule.err
new file mode 100644
index 00000000000..fb9665455ea
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsModule.err
@@ -0,0 +1 @@
+RedefinitionAsModule.ice:12 error: redefinition of `Vector' as module
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsModule.ice b/cpp/test/Slice/errorDetection/RedefinitionAsModule.ice
new file mode 100644
index 00000000000..9d9db1c412f
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsModule.ice
@@ -0,0 +1,14 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+vector<int> Vector;
+module Vector { };
+module Module { };
+module Module { };
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsNative.err b/cpp/test/Slice/errorDetection/RedefinitionAsNative.err
new file mode 100644
index 00000000000..34de406fee9
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsNative.err
@@ -0,0 +1 @@
+RedefinitionAsNative.ice:12 error: redefinition of `Class' as native
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsNative.ice b/cpp/test/Slice/errorDetection/RedefinitionAsNative.ice
new file mode 100644
index 00000000000..058ee8856b4
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsNative.ice
@@ -0,0 +1,12 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+class Class { };
+native Class;
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsOperation.err b/cpp/test/Slice/errorDetection/RedefinitionAsOperation.err
new file mode 100644
index 00000000000..f91636e2eb6
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsOperation.err
@@ -0,0 +1 @@
+RedefinitionAsOperation.ice:14 error: redefinition of `member' as operation
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsOperation.ice b/cpp/test/Slice/errorDetection/RedefinitionAsOperation.ice
new file mode 100644
index 00000000000..43602b32ca6
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsOperation.ice
@@ -0,0 +1,15 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+class Class
+{
+ int member;
+ void member();
+};
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsVector.err b/cpp/test/Slice/errorDetection/RedefinitionAsVector.err
new file mode 100644
index 00000000000..72250a5a452
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsVector.err
@@ -0,0 +1 @@
+RedefinitionAsVector.ice:12 error: redefinition of `Class' as vector
diff --git a/cpp/test/Slice/errorDetection/RedefinitionAsVector.ice b/cpp/test/Slice/errorDetection/RedefinitionAsVector.ice
new file mode 100644
index 00000000000..c42deee5afb
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/RedefinitionAsVector.ice
@@ -0,0 +1,12 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+class Class { };
+vector<int> Class;
diff --git a/cpp/test/Slice/errorDetection/Undefined.err b/cpp/test/Slice/errorDetection/Undefined.err
new file mode 100644
index 00000000000..55a50680da6
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/Undefined.err
@@ -0,0 +1,10 @@
+Undefined.ice:11 error: `Foo' is not defined
+Undefined.ice:12 error: `Foo' is not defined
+Undefined.ice:13 error: `Foo' is not defined
+Undefined.ice:14 error: `Foo3' is not defined
+Undefined.ice:14 error: `Foo2' is not defined
+Undefined.ice:14 error: `Foo1' is not defined
+Undefined.ice:15 error: `Foo' is not defined
+Undefined.ice:15 error: `Foo3' is not defined
+Undefined.ice:15 error: `Foo2' is not defined
+Undefined.ice:15 error: `Foo1' is not defined
diff --git a/cpp/test/Slice/errorDetection/Undefined.ice b/cpp/test/Slice/errorDetection/Undefined.ice
new file mode 100644
index 00000000000..5af1b47b834
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/Undefined.ice
@@ -0,0 +1,15 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+vector<Foo> FooVector;
+interface BarIntf extends Foo { };
+class BarClass1 extends Foo { };
+class BarClass2 implements Foo1, Foo2, Foo3 { };
+class BarClass3 extends Foo implements Foo1, Foo2, Foo3 { };
diff --git a/cpp/test/Slice/errorDetection/VectorRedefinition.err b/cpp/test/Slice/errorDetection/VectorRedefinition.err
new file mode 100644
index 00000000000..33675a9f621
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/VectorRedefinition.err
@@ -0,0 +1 @@
+VectorRedefinition.ice:12 error: redefinition of vector `Vector'
diff --git a/cpp/test/Slice/errorDetection/VectorRedefinition.ice b/cpp/test/Slice/errorDetection/VectorRedefinition.ice
new file mode 100644
index 00000000000..2248c565df3
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/VectorRedefinition.ice
@@ -0,0 +1,12 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+vector<int> Vector;
+vector<int> Vector;
diff --git a/cpp/test/Slice/errorDetection/WrongProxyType.err b/cpp/test/Slice/errorDetection/WrongProxyType.err
new file mode 100644
index 00000000000..835b4a08b17
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/WrongProxyType.err
@@ -0,0 +1,3 @@
+WrongProxyType.ice:15 error: `Vector' must be class or interface
+WrongProxyType.ice:16 error: `Vector' must be class or interface
+WrongProxyType.ice:17 error: `Vector' must be class or interface
diff --git a/cpp/test/Slice/errorDetection/WrongProxyType.ice b/cpp/test/Slice/errorDetection/WrongProxyType.ice
new file mode 100644
index 00000000000..0d8c2eff8cd
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/WrongProxyType.ice
@@ -0,0 +1,18 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+vector<int> Vector;
+
+interface I
+{
+ Vector* f1();
+ void f2(Vector*);
+ void f3(;Vector*);
+};
diff --git a/cpp/test/Slice/errorDetection/run.py b/cpp/test/Slice/errorDetection/run.py
new file mode 100755
index 00000000000..ac04ed0e0dd
--- /dev/null
+++ b/cpp/test/Slice/errorDetection/run.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2001
+# MutableRealms, Inc.
+# Huntsville, AL, USA
+#
+# All Rights Reserved
+#
+# **********************************************************************
+
+import os, sys, re
+
+for toplevel in ["", "..", os.path.join("..", ".."), os.path.join("..", "..", "..")]:
+ if os.path.exists(os.path.join(toplevel, "config", "TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+directory = os.path.join(toplevel, "test", "Slice", "parser")
+slice2cpp = os.path.join(toplevel, "bin", "slice2cpp")
+
+regex1 = re.compile(r".ice$", re.IGNORECASE)
+files = []
+for file in os.listdir(directory):
+ if(regex1.search(file)):
+ files.append(file)
+
+for file in files:
+
+ print file + "...",
+
+ stdin, stdout, stderr = os.popen3(slice2cpp + " " + os.path.join(directory, file))
+ lines1 = stderr.readlines()
+ lines2 = open(os.path.join(directory, regex1.sub(".err", file)), "r").readlines()
+
+ if len(lines1) != len(lines2):
+ print "failed!"
+ continue
+
+ regex2 = re.compile(r"^.*(?=" + file + ")")
+ diffs = ""
+ i = 0
+ while i < len(lines1) and i < len(lines2):
+ line1 = regex2.sub("", lines1[i])
+ line2 = regex2.sub("", lines2[i])
+ if line1 != line2:
+ print "failed!"
+ break
+ i += 1
+ else:
+ print "ok"