summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-10-18 20:28:38 +0000
committerMarc Laukien <marc@zeroc.com>2001-10-18 20:28:38 +0000
commitab9a6eac4a0f801ae9c3ef1becce488c73f051cd (patch)
tree14c847cd917683276e940b3c4b53f024f81abae3 /cpp
parentfile SslConfig.h was initially added on branch asn_security_1. (diff)
downloadice-ab9a6eac4a0f801ae9c3ef1becce488c73f051cd.tar.bz2
ice-ab9a6eac4a0f801ae9c3ef1becce488c73f051cd.tar.xz
ice-ab9a6eac4a0f801ae9c3ef1becce488c73f051cd.zip
more facet stuff
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/allTests.py1
-rw-r--r--cpp/include/Ice/Object.h4
-rw-r--r--cpp/src/Ice/Object.cpp7
-rw-r--r--cpp/src/Ice/Reference.cpp2
-rw-r--r--cpp/test/Ice/Makefile3
-rw-r--r--cpp/test/Ice/facets/.depend8
-rw-r--r--cpp/test/Ice/facets/AllTests.cpp62
-rw-r--r--cpp/test/Ice/facets/Client.cpp57
-rw-r--r--cpp/test/Ice/facets/Collocated.cpp65
-rw-r--r--cpp/test/Ice/facets/Server.cpp65
-rw-r--r--cpp/test/Ice/facets/Test.ice50
-rw-r--r--cpp/test/Ice/facets/TestI.cpp65
-rw-r--r--cpp/test/Ice/facets/TestI.h71
-rw-r--r--cpp/test/Ice/facets/facetsC.dsp159
-rw-r--r--cpp/test/Ice/facets/facetsCOL.dsp167
-rw-r--r--cpp/test/Ice/facets/facetsS.dsp163
-rwxr-xr-xcpp/test/Ice/facets/run.py26
17 files changed, 971 insertions, 4 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py
index 4047b0b1cfc..60f80ef8ea5 100755
--- a/cpp/allTests.py
+++ b/cpp/allTests.py
@@ -23,6 +23,7 @@ for i in \
"Ice/operations", \
"Ice/exceptions", \
"Ice/inheritance", \
+ "Ice/facets", \
"Ice/faultTolerance", \
"Ice/locationForward", \
"IcePack/simple", \
diff --git a/cpp/include/Ice/Object.h b/cpp/include/Ice/Object.h
index 98b7c2e1398..fc24bd0ec96 100644
--- a/cpp/include/Ice/Object.h
+++ b/cpp/include/Ice/Object.h
@@ -57,6 +57,8 @@ class ICE_API Object : virtual public ::IceUtil::Shared
{
public:
+ Object();
+
virtual bool _isA(const std::string&);
virtual void _ping();
::IceInternal::DispatchStatus ____isA(::IceInternal::Incoming&);
@@ -72,7 +74,7 @@ public:
void _addFacet(const ObjectPtr&, const ::std::string&);
void _removeFacet(const ::std::string&);
- void _removeAllFacets(const ::std::string&);
+ void _removeAllFacets();
ObjectPtr _findFacet(const ::std::string&);
private:
diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp
index e2458e9ac89..a0ec4de0eef 100644
--- a/cpp/src/Ice/Object.cpp
+++ b/cpp/src/Ice/Object.cpp
@@ -28,6 +28,11 @@ Ice::LocationForward::LocationForward(const ObjectPrx& p) :
{
}
+Ice::Object::Object() :
+ _activeFacetMapHint(_activeFacetMap.end())
+{
+}
+
bool
Ice::Object::_isA(const string& s)
{
@@ -138,7 +143,7 @@ Ice::Object::_removeFacet(const string& name)
}
void
-Ice::Object::_removeAllFacets(const string& name)
+Ice::Object::_removeAllFacets()
{
JTCSyncT<JTCMutex> sync(_activeFacetMapMutex);
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index 5fbc4d52ad6..172ff995567 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -24,7 +24,7 @@ IceInternal::Reference::Reference(const InstancePtr& inst, const string& ident,
const vector<EndpointPtr>& origEndpts, const vector<EndpointPtr>& endpts) :
instance(inst),
identity(ident),
- facet(facet),
+ facet(fac),
mode(md),
secure(sec),
origEndpoints(origEndpts),
diff --git a/cpp/test/Ice/Makefile b/cpp/test/Ice/Makefile
index e753056f8b7..524bf21c0be 100644
--- a/cpp/test/Ice/Makefile
+++ b/cpp/test/Ice/Makefile
@@ -13,8 +13,9 @@ top_srcdir = ../..
include $(top_srcdir)/config/Make.rules
SUBDIRS = operations \
- inheritance \
exceptions \
+ inheritance \
+ facets \
faultTolerance \
locationForward
diff --git a/cpp/test/Ice/facets/.depend b/cpp/test/Ice/facets/.depend
new file mode 100644
index 00000000000..844144d981e
--- /dev/null
+++ b/cpp/test/Ice/facets/.depend
@@ -0,0 +1,8 @@
+Test.o: Test.cpp Test.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalException.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/Proxy.h ../../../include/Ice/ProxyFactoryF.h ../../../include/Ice/EmitterF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ReferenceF.h ../../../include/Ice/Object.h ../../../include/Ice/Outgoing.h ../../../include/Ice/BasicStream.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h ../../../include/Ice/ServantLocatorF.h
+Client.o: Client.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalException.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/Stream.h ../../../include/Ice/Communicator.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/StreamF.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantLocator.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/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h
+AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalException.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/Stream.h ../../../include/Ice/Communicator.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/StreamF.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantLocator.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/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h
+TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalException.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/Stream.h ../../../include/Ice/Communicator.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/StreamF.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantLocator.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/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h
+Server.o: Server.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalException.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/Stream.h ../../../include/Ice/Communicator.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/StreamF.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantLocator.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/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h
+TestI.o: TestI.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalException.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/Stream.h ../../../include/Ice/Communicator.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/StreamF.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantLocator.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/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h
+Collocated.o: Collocated.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalException.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/Stream.h ../../../include/Ice/Communicator.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/StreamF.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantLocator.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/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h
+AllTests.o: AllTests.cpp ../../../include/Ice/Ice.h ../../../include/Ice/Initialize.h ../../../include/Ice/CommunicatorF.h ../../../include/Ice/ProxyF.h ../../../include/Ice/ProxyHandle.h ../../../include/IceUtil/Handle.h ../../../include/IceUtil/Exception.h ../../../include/IceUtil/Config.h ../../../include/Ice/Config.h ../../../include/Ice/ObjectF.h ../../../include/Ice/Handle.h ../../../include/Ice/LocalObjectF.h ../../../include/Ice/Exception.h ../../../include/Ice/LocalException.h ../../../include/Ice/LocalObject.h ../../../include/IceUtil/Shared.h ../../../include/Ice/PropertiesF.h ../../../include/Ice/InstanceF.h ../../../include/Ice/Properties.h ../../../include/Ice/Logger.h ../../../include/Ice/Stream.h ../../../include/Ice/Communicator.h ../../../include/Ice/LoggerF.h ../../../include/Ice/ObjectAdapterF.h ../../../include/Ice/ServantFactoryF.h ../../../include/Ice/UserExceptionFactoryF.h ../../../include/Ice/StreamF.h ../../../include/Ice/ServantFactory.h ../../../include/Ice/UserExceptionFactory.h ../../../include/Ice/ObjectAdapter.h ../../../include/Ice/ServantLocatorF.h ../../../include/Ice/ServantLocator.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/BasicStream.h ../../../include/Ice/Buffer.h ../../../include/Ice/Incoming.h ../../../include/Ice/Direct.h
diff --git a/cpp/test/Ice/facets/AllTests.cpp b/cpp/test/Ice/facets/AllTests.cpp
new file mode 100644
index 00000000000..ad0e7401b9f
--- /dev/null
+++ b/cpp/test/Ice/facets/AllTests.cpp
@@ -0,0 +1,62 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestCommon.h>
+#include <Test.h>
+
+using namespace std;
+
+GPrx
+allTests(const Ice::CommunicatorPtr& communicator)
+{
+ cout << "testing stringToProxy... " << flush;
+ string ref("d:tcp -p 12345 -t 2000");
+ Ice::ObjectPrx db = communicator->stringToProxy(ref);
+ test(db);
+ cout << "ok" << endl;
+
+ cout << "testing checked cast... " << flush;
+ DPrx d = DPrx::checkedCast(db);
+ test(d);
+ test(d == db);
+ cout << "ok" << endl;
+
+ cout << "testing non-facets A, B, C, and D... " << flush;
+ test(d->callA() == "A");
+ test(d->callB() == "B");
+ test(d->callC() == "C");
+ test(d->callD() == "D");
+ cout << "ok" << endl;
+
+ cout << "testing facets A, B, C, and D... " << flush;
+ DPrx df = DPrx::checkedCast(d, "facetABCD");
+ test(df);
+ test(df->callA() == "A");
+ test(df->callB() == "B");
+ test(df->callC() == "C");
+ test(df->callD() == "D");
+ cout << "ok" << endl;
+
+ cout << "testing facets E and F... " << flush;
+ FPrx ff = FPrx::checkedCast(d, "facetEF");
+ test(ff);
+ test(ff->callE() == "E");
+ test(ff->callF() == "F");
+ cout << "ok" << endl;
+
+ cout << "testing facet G... " << flush;
+ GPrx gf = GPrx::checkedCast(d, "facetG");
+ test(gf);
+ test(gf->callG() == "G");
+ cout << "ok" << endl;
+
+ return gf;
+}
diff --git a/cpp/test/Ice/facets/Client.cpp b/cpp/test/Ice/facets/Client.cpp
new file mode 100644
index 00000000000..70940eb44d2
--- /dev/null
+++ b/cpp/test/Ice/facets/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[], const Ice::CommunicatorPtr& communicator)
+{
+ GPrx allTests(const Ice::CommunicatorPtr&);
+ GPrx g = allTests(communicator);
+ g->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::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/facets/Collocated.cpp b/cpp/test/Ice/facets/Collocated.cpp
new file mode 100644
index 00000000000..348a2d1d2eb
--- /dev/null
+++ b/cpp/test/Ice/facets/Collocated.cpp
@@ -0,0 +1,65 @@
+// **********************************************************************
+//
+// 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[], const Ice::CommunicatorPtr& communicator)
+{
+ string endpts("tcp -p 12345 -t 2000");
+ Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts);
+ Ice::ObjectPtr d = new DI;
+ adapter->add(d, "d");
+ d->_addFacet(d, "facetABCD");
+ d->_addFacet(new FI, "facetEF");
+ d->_addFacet(new GI(communicator), "facetG");
+
+ GPrx allTests(const Ice::CommunicatorPtr&);
+ allTests(communicator);
+
+ d->_removeAllFacets(); // Break cyclic dependencies
+ 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::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/facets/Server.cpp b/cpp/test/Ice/facets/Server.cpp
new file mode 100644
index 00000000000..dc6579078c2
--- /dev/null
+++ b/cpp/test/Ice/facets/Server.cpp
@@ -0,0 +1,65 @@
+// **********************************************************************
+//
+// 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[], const Ice::CommunicatorPtr& communicator)
+{
+ string endpts("tcp -p 12345 -t 2000");
+ Ice::ObjectAdapterPtr adapter = communicator->createObjectAdapterWithEndpoints("TestAdapter", endpts);
+ Ice::ObjectPtr d = new DI;
+ adapter->add(d, "d");
+ d->_addFacet(d, "facetABCD");
+ d->_addFacet(new FI, "facetEF");
+ d->_addFacet(new GI(communicator), "facetG");
+
+ adapter->activate();
+ communicator->waitForShutdown();
+
+ d->_removeAllFacets(); // Break cyclic dependencies
+ 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::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+
+ if (communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::Exception& ex)
+ {
+ cerr << ex << endl;
+ status = EXIT_FAILURE;
+ }
+ }
+
+ return status;
+}
diff --git a/cpp/test/Ice/facets/Test.ice b/cpp/test/Ice/facets/Test.ice
new file mode 100644
index 00000000000..03075f3713c
--- /dev/null
+++ b/cpp/test/Ice/facets/Test.ice
@@ -0,0 +1,50 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_ICE
+#define TEST_ICE
+
+interface A
+{
+ string callA();
+};
+
+interface B extends A
+{
+ string callB();
+};
+
+interface C extends A
+{
+ string callC();
+};
+
+interface D extends B, C
+{
+ string callD();
+};
+
+interface E
+{
+ string callE();
+};
+
+interface F extends E
+{
+ string callF();
+};
+
+interface G
+{
+ void shutdown();
+ string callG();
+};
+
+#endif
diff --git a/cpp/test/Ice/facets/TestI.cpp b/cpp/test/Ice/facets/TestI.cpp
new file mode 100644
index 00000000000..550bf39b878
--- /dev/null
+++ b/cpp/test/Ice/facets/TestI.cpp
@@ -0,0 +1,65 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <TestI.h>
+
+std::string
+AI::callA()
+{
+ return "A";
+}
+
+std::string
+BI::callB()
+{
+ return "B";
+}
+
+std::string
+CI::callC()
+{
+ return "C";
+}
+
+std::string
+DI::callD()
+{
+ return "D";
+}
+
+std::string
+EI::callE()
+{
+ return "E";
+}
+
+std::string
+FI::callF()
+{
+ return "F";
+}
+
+GI::GI(const Ice::CommunicatorPtr& communicator) :
+ _communicator(communicator)
+{
+}
+
+void
+GI::shutdown()
+{
+ _communicator->shutdown();
+}
+
+std::string
+GI::callG()
+{
+ return "G";
+}
diff --git a/cpp/test/Ice/facets/TestI.h b/cpp/test/Ice/facets/TestI.h
new file mode 100644
index 00000000000..95e29d15682
--- /dev/null
+++ b/cpp/test/Ice/facets/TestI.h
@@ -0,0 +1,71 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+#ifndef TEST_I_H
+#define TEST_I_H
+
+#include <Test.h>
+
+class AI : virtual public A
+{
+public:
+
+ virtual std::string callA();
+};
+
+class BI : virtual public B, virtual public AI
+{
+public:
+
+ virtual std::string callB();
+};
+
+class CI : virtual public C, virtual public AI
+{
+public:
+
+ virtual std::string callC();
+};
+
+class DI : virtual public D, virtual public BI, virtual public CI
+{
+public:
+
+ virtual std::string callD();
+};
+
+class EI : virtual public E
+{
+public:
+
+ virtual std::string callE();
+};
+
+class FI : virtual public F, virtual public EI
+{
+public:
+
+ virtual std::string callF();
+};
+
+class GI : virtual public G
+{
+public:
+
+ GI(const Ice::CommunicatorPtr&);
+ virtual void shutdown();
+ virtual std::string callG();
+
+private:
+
+ Ice::CommunicatorPtr _communicator;
+};
+
+#endif
diff --git a/cpp/test/Ice/facets/facetsC.dsp b/cpp/test/Ice/facets/facetsC.dsp
new file mode 100644
index 00000000000..652946ff3cb
--- /dev/null
+++ b/cpp/test/Ice/facets/facetsC.dsp
@@ -0,0 +1,159 @@
+# Microsoft Developer Studio Project File - Name="facetsC" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=facetsC - 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 "facetsC.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 "facetsC.mak" CFG="facetsC - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "facetsC - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "facetsC - 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)" == "facetsC - 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 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# SUBTRACT CPP /Fr
+# 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 ws2_32.lib jtc.lib /nologo /subsystem:console /machine:I386 /out:"client.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "facetsC - 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" /YX /FD /GZ /c
+# SUBTRACT CPP /WX /Fr
+# 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 ws2_32.lib jtcd.lib /nologo /subsystem:console /debug /machine:I386 /out:"client.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "facetsC - Win32 Release"
+# Name "facetsC - 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)" == "facetsC - 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)" == "facetsC - 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/facets/facetsCOL.dsp b/cpp/test/Ice/facets/facetsCOL.dsp
new file mode 100644
index 00000000000..48cdc00c614
--- /dev/null
+++ b/cpp/test/Ice/facets/facetsCOL.dsp
@@ -0,0 +1,167 @@
+# Microsoft Developer Studio Project File - Name="facetsCOL" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=facetsCOL - 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 "facetsCOL.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 "facetsCOL.mak" CFG="facetsCOL - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "facetsCOL - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "facetsCOL - 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)" == "facetsCOL - 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 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# SUBTRACT CPP /Fr
+# 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 ws2_32.lib jtc.lib /nologo /subsystem:console /machine:I386 /out:"collocated.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "facetsCOL - 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" /YX /FD /GZ /c
+# SUBTRACT CPP /WX /Fr
+# 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 ws2_32.lib jtcd.lib /nologo /subsystem:console /debug /machine:I386 /out:"collocated.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "facetsCOL - Win32 Release"
+# Name "facetsCOL - 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)" == "facetsCOL - 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)" == "facetsCOL - 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/facets/facetsS.dsp b/cpp/test/Ice/facets/facetsS.dsp
new file mode 100644
index 00000000000..fa2419f973e
--- /dev/null
+++ b/cpp/test/Ice/facets/facetsS.dsp
@@ -0,0 +1,163 @@
+# Microsoft Developer Studio Project File - Name="facetsS" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=facetsS - 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 "facetsS.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 "facetsS.mak" CFG="facetsS - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "facetsS - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "facetsS - 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)" == "facetsS - 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 /WX /GR /GX /O2 /I "." /I "../../../include" /I "../../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
+# SUBTRACT CPP /Fr
+# 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 ws2_32.lib jtc.lib /nologo /subsystem:console /machine:I386 /out:"server.exe" /libpath:"../../../lib"
+
+!ELSEIF "$(CFG)" == "facetsS - 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" /YX /FD /GZ /c
+# SUBTRACT CPP /WX /Fr
+# 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 ws2_32.lib jtcd.lib /nologo /subsystem:console /debug /machine:I386 /out:"server.exe" /pdbtype:sept /libpath:"../../../lib"
+
+!ENDIF
+
+# Begin Target
+
+# Name "facetsS - Win32 Release"
+# Name "facetsS - 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)" == "facetsS - 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)" == "facetsS - 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/facets/run.py b/cpp/test/Ice/facets/run.py
new file mode 100755
index 00000000000..b20ab69c1fb
--- /dev/null
+++ b/cpp/test/Ice/facets/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 [".", "..", "../..", "../../..", "../../../.."]:
+ if os.path.exists(os.path.normpath(toplevel + "/config/TestUtil.py")):
+ break
+else:
+ raise "can't find toplevel directory!"
+
+sys.path.append(os.path.normpath(toplevel + "/config"))
+import TestUtil
+
+name = "Ice/facets"
+TestUtil.clientServerTest(toplevel, name)
+TestUtil.collocatedTest(toplevel, name)
+sys.exit(0)