summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rwxr-xr-xcpp/allTests.py1
-rw-r--r--cpp/src/Ice/HashUtil.h7
-rw-r--r--cpp/src/Ice/Makefile.mak1
-rw-r--r--cpp/src/Ice/OpaqueEndpointI.cpp3
-rw-r--r--cpp/src/Ice/Reference.cpp12
-rw-r--r--cpp/src/Ice/TcpEndpointI.cpp7
-rw-r--r--cpp/src/Ice/UdpEndpointI.cpp7
-rw-r--r--cpp/src/Ice/winrt/StreamEndpointI.cpp7
-rw-r--r--cpp/src/IceSSL/EndpointI.cpp7
-rw-r--r--cpp/src/slice2cs/Gen.cpp74
-rw-r--r--cpp/src/slice2java/Gen.cpp118
-rw-r--r--cpp/test/Ice/Makefile1
-rw-r--r--cpp/test/Ice/Makefile.mak3
-rw-r--r--cpp/test/Ice/hash/.depend3
-rw-r--r--cpp/test/Ice/hash/.depend.mak3
-rw-r--r--cpp/test/Ice/hash/.gitignore6
-rw-r--r--cpp/test/Ice/hash/Client.cpp139
-rw-r--r--cpp/test/Ice/hash/Makefile33
-rw-r--r--cpp/test/Ice/hash/Makefile.mak49
-rw-r--r--cpp/test/Ice/hash/Test.ice20
-rwxr-xr-xcpp/test/Ice/hash/run.py25
-rw-r--r--cpp/test/WinRT/TestSuite/MainPage.xaml.cpp3
-rw-r--r--cpp/test/WinRT/TestSuite/TestSuite.vcxproj3
-rw-r--r--cpp/test/WinRT/TestSuite/TestSuite.vcxproj.filters3
24 files changed, 337 insertions, 198 deletions
diff --git a/cpp/allTests.py b/cpp/allTests.py
index c0432217228..f124bf519bd 100755
--- a/cpp/allTests.py
+++ b/cpp/allTests.py
@@ -66,6 +66,7 @@ tests = [
("Ice/defaultServant", ["core"]),
("Ice/defaultValue", ["core"]),
("Ice/invoke", ["core", "novc6"]),
+ ("Ice/hash", ["once"]),
("IceSSL/configuration", ["once", "novalgrind"]), # valgrind doesn't work well with openssl
("IceBox/configuration", ["core", "noipv6", "novc6", "nomingw"]),
("Freeze/dbmap", ["once", "novc6", "nomingw"]),
diff --git a/cpp/src/Ice/HashUtil.h b/cpp/src/Ice/HashUtil.h
index 7b6c7f6a27b..d23ee90ff0c 100644
--- a/cpp/src/Ice/HashUtil.h
+++ b/cpp/src/Ice/HashUtil.h
@@ -15,13 +15,13 @@ namespace IceInternal
inline void
hashAdd(Ice::Int& hashCode, Ice::Int value)
{
- hashCode = hashCode * 5 + value;
+ hashCode = ((hashCode << 5) + hashCode) ^ (2654435761u * value);
}
inline void
hashAdd(Ice::Int& hashCode, bool value)
{
- hashCode = hashCode * 5 + static_cast<Ice::Int>(value);
+ hashCode = ((hashCode << 5) + hashCode) ^ (value ? 1 : 0);
}
inline void
@@ -29,7 +29,7 @@ hashAdd(Ice::Int& hashCode, const std::string& value)
{
for(std::string::const_iterator p = value.begin(); p != value.end(); ++p)
{
- hashCode = 5 * hashCode + *p;
+ hashCode = ((hashCode << 5) + hashCode) ^ *p;
}
}
@@ -52,5 +52,4 @@ hashAdd(Ice::Int& hashCode, const std::map<K, V>& map)
}
}
-
}
diff --git a/cpp/src/Ice/Makefile.mak b/cpp/src/Ice/Makefile.mak
index 522da39075e..b5378cba7ef 100644
--- a/cpp/src/Ice/Makefile.mak
+++ b/cpp/src/Ice/Makefile.mak
@@ -124,7 +124,6 @@ CPPFLAGS = $(CPPFLAGS) -DCOMPSUFFIX=\"$(COMPSUFFIX)\"
SLICE2CPPFLAGS = --ice --include-dir Ice --dll-export ICE_API $(SLICE2CPPFLAGS)
LINKWITH = $(BASELIBS) $(BZIP2_LIBS) $(ICE_OS_LIBS) ws2_32.lib Iphlpapi.lib
-
PDBFLAGS = /pdb:$(DLLNAME:.dll=.pdb)
LD_DLLFLAGS = $(LD_DLLFLAGS) /entry:"ice_DLL_Main"
RES_FILE = Ice.res
diff --git a/cpp/src/Ice/OpaqueEndpointI.cpp b/cpp/src/Ice/OpaqueEndpointI.cpp
index a3ed87efd85..80e3146a327 100644
--- a/cpp/src/Ice/OpaqueEndpointI.cpp
+++ b/cpp/src/Ice/OpaqueEndpointI.cpp
@@ -433,7 +433,8 @@ IceInternal::OpaqueEndpointI::operator<(const LocalObject& r) const
Ice::Int
IceInternal::OpaqueEndpointI::hashInit() const
{
- Ice::Int h = _type;
+ Ice::Int h = 5381;
+ hashAdd(h, _type);
hashAdd(h, _rawEncoding.major);
hashAdd(h, _rawEncoding.minor);
hashAdd(h, _rawBytes);
diff --git a/cpp/src/Ice/Reference.cpp b/cpp/src/Ice/Reference.cpp
index 3ec8385c214..0b8a6eaff7b 100644
--- a/cpp/src/Ice/Reference.cpp
+++ b/cpp/src/Ice/Reference.cpp
@@ -483,12 +483,20 @@ IceInternal::Reference::Reference(const Reference& r) :
int
IceInternal::Reference::hashInit() const
{
- Int h = static_cast<Int>(_mode);
+ Int h = 5381;
+ hashAdd(h, static_cast<Int>(_mode));
+ hashAdd(h, _secure);
hashAdd(h, _identity.name);
hashAdd(h, _identity.category);
hashAdd(h, _context->getValue());
hashAdd(h, _facet);
- hashAdd(h, _secure);
+ hashAdd(h, _overrideCompress);
+ if(_overrideCompress)
+ {
+ hashAdd(h, _compress);
+ }
+ hashAdd(h, _encoding.major);
+ hashAdd(h, _encoding.minor);
return h;
}
diff --git a/cpp/src/Ice/TcpEndpointI.cpp b/cpp/src/Ice/TcpEndpointI.cpp
index e38885976fb..9c64b22057b 100644
--- a/cpp/src/Ice/TcpEndpointI.cpp
+++ b/cpp/src/Ice/TcpEndpointI.cpp
@@ -547,10 +547,15 @@ IceInternal::TcpEndpointI::operator<(const LocalObject& r) const
Ice::Int
IceInternal::TcpEndpointI::hashInit() const
{
- Ice::Int h = 0;
+ Ice::Int h = 5381;
+ hashAdd(h, TCPEndpointType);
hashAdd(h, _host);
hashAdd(h, _port);
hashAdd(h, _timeout);
+ hashAdd(h, _protocol.major);
+ hashAdd(h, _protocol.minor);
+ hashAdd(h, _encoding.major);
+ hashAdd(h, _encoding.minor);
hashAdd(h, _connectionId);
hashAdd(h, _compress);
return h;
diff --git a/cpp/src/Ice/UdpEndpointI.cpp b/cpp/src/Ice/UdpEndpointI.cpp
index f8dacf01d7a..db5f1a495b7 100644
--- a/cpp/src/Ice/UdpEndpointI.cpp
+++ b/cpp/src/Ice/UdpEndpointI.cpp
@@ -632,12 +632,17 @@ IceInternal::UdpEndpointI::operator<(const LocalObject& r) const
Ice::Int
IceInternal::UdpEndpointI::hashInit() const
{
- Ice::Int h = 0;
+ Ice::Int h = 5381;
+ hashAdd(h, UDPEndpointType);
hashAdd(h, _host);
hashAdd(h, _port);
hashAdd(h, _mcastInterface);
hashAdd(h, _mcastTtl);
hashAdd(h, _connect);
+ hashAdd(h, _protocol.major);
+ hashAdd(h, _protocol.minor);
+ hashAdd(h, _encoding.major);
+ hashAdd(h, _encoding.minor);
hashAdd(h, _connectionId);
hashAdd(h, _compress);
return h;
diff --git a/cpp/src/Ice/winrt/StreamEndpointI.cpp b/cpp/src/Ice/winrt/StreamEndpointI.cpp
index 1f1c030f84e..d048945f0a0 100644
--- a/cpp/src/Ice/winrt/StreamEndpointI.cpp
+++ b/cpp/src/Ice/winrt/StreamEndpointI.cpp
@@ -587,10 +587,15 @@ IceInternal::StreamEndpointI::operator<(const LocalObject& r) const
Ice::Int
IceInternal::StreamEndpointI::hashInit() const
{
- Ice::Int h = 0;
+ Ice::Int h = 5381;
+ hashAdd(h, _type);
hashAdd(h, _host);
hashAdd(h, _port);
hashAdd(h, _timeout);
+ hashAdd(h, _protocol.major);
+ hashAdd(h, _protocol.minor);
+ hashAdd(h, _encoding.major);
+ hashAdd(h, _encoding.minor);
hashAdd(h, _connectionId);
hashAdd(h, _compress);
return h;
diff --git a/cpp/src/IceSSL/EndpointI.cpp b/cpp/src/IceSSL/EndpointI.cpp
index a9eb8e707d8..0b33e896741 100644
--- a/cpp/src/IceSSL/EndpointI.cpp
+++ b/cpp/src/IceSSL/EndpointI.cpp
@@ -544,10 +544,15 @@ IceSSL::EndpointI::operator<(const Ice::LocalObject& r) const
Ice::Int
IceSSL::EndpointI::hashInit() const
{
- Int h = 0;
+ Int h = 5381;
+ IceInternal::hashAdd(h, EndpointType);
IceInternal::hashAdd(h, _host);
IceInternal::hashAdd(h, _port);
IceInternal::hashAdd(h, _timeout);
+ IceInternal::hashAdd(h, _protocol.major);
+ IceInternal::hashAdd(h, _protocol.minor);
+ IceInternal::hashAdd(h, _encoding.major);
+ IceInternal::hashAdd(h, _encoding.minor);
IceInternal::hashAdd(h, _connectionId);
IceInternal::hashAdd(h, _compress);
return h;
diff --git a/cpp/src/slice2cs/Gen.cpp b/cpp/src/slice2cs/Gen.cpp
index f636b758a77..f76877a2065 100644
--- a/cpp/src/slice2cs/Gen.cpp
+++ b/cpp/src/slice2cs/Gen.cpp
@@ -2844,8 +2844,9 @@ Slice::Gen::TypesVisitor::visitExceptionEnd(const ExceptionPtr& p)
}
else
{
- _out << nl << "int h__ = 0;";
+ _out << nl << "int h__ = 5381;";
}
+ _out << nl << "IceInternal.HashUtil.hashAdd(ref h__, \"" << p->scoped() << "\");";
writeMemberHashCode(dataMembers, DotNet::Exception);
_out << nl << "return h__;";
_out << eb;
@@ -3252,7 +3253,8 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
emitGeneratedCodeAttribute();
_out << nl << "public override int GetHashCode()";
_out << sb;
- _out << nl << "int h__ = 0;";
+ _out << nl << "int h__ = 5381;";
+ _out << nl << "IceInternal.HashUtil.hashAdd(ref h__, \"" << p->scoped() << "\");";
writeMemberHashCode(dataMembers, isClass ? DotNet::ICloneable : 0);
_out << nl << "return h__;";
_out << eb;
@@ -3678,73 +3680,7 @@ Slice::Gen::TypesVisitor::writeMemberHashCode(const DataMemberList& dataMembers,
{
for(DataMemberList::const_iterator q = dataMembers.begin(); q != dataMembers.end(); ++q)
{
- string memberName = fixId((*q)->name(), baseTypes);
- TypePtr memberType = (*q)->type();
- bool isValue = isValueType(memberType);
- if(!isValue)
- {
- _out << nl << "if(" << memberName << " != null)";
- _out << sb;
- }
- SequencePtr seq = SequencePtr::dynamicCast(memberType);
- if(seq)
- {
- string meta;
- bool isSerializable = seq->findMetaData("clr:serializable", meta);
- bool isGeneric = seq->findMetaData("clr:generic:", meta);
- bool isArray = !isSerializable && !isGeneric && !seq->hasMetaData("clr:collection");
- if(isArray)
- {
- //
- // GetHashCode() for native arrays does not have value semantics.
- //
- _out << nl << "h__ = 5 * h__ + IceUtilInternal.Arrays.GetHashCode(" << memberName << ");";
- }
- else if(isGeneric)
- {
- //
- // GetHashCode() for generic types does not have value semantics.
- //
- _out << nl << "h__ = 5 * h__ + IceUtilInternal.Collections.SequenceGetHashCode(" << memberName << ");";
- }
- else
- {
- //
- // GetHashCode() for CollectionBase has value semantics.
- //
- _out << nl << "h__ = 5 * h__ + " << memberName << ".GetHashCode();";
- }
- }
- else
- {
- DictionaryPtr dict = DictionaryPtr::dynamicCast(memberType);
- if(dict)
- {
- if(dict->hasMetaData("clr:collection"))
- {
- //
- // GetHashCode() for DictionaryBase has value semantics.
- //
- _out << nl << "h__ = 5 * h__ + " << memberName << ".GetHashCode();";
- }
- else
- {
- //
- // GetHashCode() for generic types does not have value semantics.
- //
- _out << nl << "h__ = 5 * h__ + IceUtilInternal.Collections.DictionaryGetHashCode(" << memberName
- << ");";
- }
- }
- else
- {
- _out << nl << "h__ = 5 * h__ + " << memberName << ".GetHashCode();";
- }
- }
- if(!isValue)
- {
- _out << eb;
- }
+ _out << nl << "IceInternal.HashUtil.hashAdd(ref h__, " << fixId((*q)->name(), baseTypes) << ");";
}
}
diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp
index 3f0c23c2aca..1a9b678b6aa 100644
--- a/cpp/src/slice2java/Gen.cpp
+++ b/cpp/src/slice2java/Gen.cpp
@@ -465,110 +465,6 @@ Slice::JavaVisitor::writeDelegateThrowsClause(const string& package, const Excep
}
void
-Slice::JavaVisitor::writeHashCode(Output& out, const TypePtr& type, const string& name, int& iter,
- const StringList& metaData)
-{
- BuiltinPtr builtin = BuiltinPtr::dynamicCast(type);
- if(builtin)
- {
- switch(builtin->kind())
- {
- case Builtin::KindByte:
- case Builtin::KindShort:
- case Builtin::KindLong:
- {
- out << nl << "__h = 5 * __h + (int)" << name << ';';
- break;
- }
- case Builtin::KindBool:
- {
- out << nl << "__h = 5 * __h + (" << name << " ? 1 : 0);";
- break;
- }
- case Builtin::KindInt:
- {
- out << nl << "__h = 5 * __h + " << name << ';';
- break;
- }
- case Builtin::KindFloat:
- {
- out << nl << "__h = 5 * __h + java.lang.Float.floatToIntBits(" << name << ");";
- break;
- }
- case Builtin::KindDouble:
- {
- out << nl << "__h = 5 * __h + (int)java.lang.Double.doubleToLongBits(" << name << ");";
- break;
- }
- case Builtin::KindString:
- {
- out << nl << "if(" << name << " != null)";
- out << sb;
- out << nl << "__h = 5 * __h + " << name << ".hashCode();";
- out << eb;
- break;
- }
- case Builtin::KindObject:
- case Builtin::KindObjectProxy:
- case Builtin::KindLocalObject:
- {
- out << nl << "if(" << name << " != null)";
- out << sb;
- out << nl << "__h = 5 * __h + " << name << ".hashCode();";
- out << eb;
- break;
- }
- }
- return;
- }
-
- ProxyPtr prx = ProxyPtr::dynamicCast(type);
- ClassDeclPtr cl = ClassDeclPtr::dynamicCast(type);
- DictionaryPtr dict = DictionaryPtr::dynamicCast(type);
- if(prx || cl || dict)
- {
- out << nl << "if(" << name << " != null)";
- out << sb;
- out << nl << "__h = 5 * __h + " << name << ".hashCode();";
- out << eb;
- return;
- }
-
- SequencePtr seq = SequencePtr::dynamicCast(type);
- if(seq)
- {
- bool customType = hasTypeMetaData(seq, metaData);
-
- out << nl << "if(" << name << " != null)";
- out << sb;
- if(customType)
- {
- out << nl << "__h = 5 * __h + " << name << ".hashCode();";
- }
- else
- {
- out << nl << "for(int __i" << iter << " = 0; __i" << iter << " < " << name << ".length; __i" << iter
- << "++)";
- out << sb;
- ostringstream elem;
- elem << name << "[__i" << iter << ']';
- iter++;
- writeHashCode(out, seq->type(), elem.str(), iter);
- out << eb;
- }
- out << eb;
- return;
- }
-
- ConstructedPtr constructed = ConstructedPtr::dynamicCast(type);
- assert(constructed);
- out << nl << "if(" << name << " != null)";
- out << sb;
- out << nl << "__h = 5 * __h + " << name << ".hashCode();";
- out << eb;
-}
-
-void
Slice::JavaVisitor::writeMarshalDataMember(Output& out, const string& package, const DataMemberPtr& member, int& iter)
{
if(!member->optional())
@@ -2528,14 +2424,6 @@ Slice::Gen::TieVisitor::visitClassDefStart(const ClassDefPtr& p)
if(p->isLocal())
{
- out << sp << nl << "/**";
- out << nl << " * @deprecated This method is deprecated, use hashCode instead.";
- out << nl << " **/";
- out << nl << "public int" << nl << "ice_hash()";
- out << sb;
- out << nl << "return hashCode();";
- out << eb;
-
out << sp << nl << "public java.lang.Object" << nl << "clone()";
out.inc();
out << nl << "throws java.lang.CloneNotSupportedException";
@@ -3772,13 +3660,13 @@ Slice::Gen::TypesVisitor::visitStructEnd(const StructPtr& p)
out << sp << nl << "public int" << nl << "hashCode()";
out << sb;
- out << nl << "int __h = 0;";
+ out << nl << "int __h = 5381;";
+ out << nl << "__h = IceInternal.HashUtil.hashAdd(__h, \"" << p->scoped() << "\");";
iter = 0;
for(d = members.begin(); d != members.end(); ++d)
{
string memberName = fixKwd((*d)->name());
- StringList metaData = (*d)->getMetaData();
- writeHashCode(out, (*d)->type(), memberName, iter, metaData);
+ out << nl << "__h = IceInternal.HashUtil.hashAdd(__h, " << memberName << ");";
}
out << nl << "return __h;";
out << eb;
diff --git a/cpp/test/Ice/Makefile b/cpp/test/Ice/Makefile
index c9f3b3390ec..15092758312 100644
--- a/cpp/test/Ice/Makefile
+++ b/cpp/test/Ice/Makefile
@@ -24,6 +24,7 @@ SUBDIRS = proxy \
adapterDeactivation \
slicing \
gc \
+ hash \
checksum \
stream \
dispatcher \
diff --git a/cpp/test/Ice/Makefile.mak b/cpp/test/Ice/Makefile.mak
index 12a0b8186de..eaa8112b30a 100644
--- a/cpp/test/Ice/Makefile.mak
+++ b/cpp/test/Ice/Makefile.mak
@@ -20,6 +20,7 @@ SUBDIRS = proxy \
objects \
location \
adapterDeactivation \
+ hash \
ami \
invoke \
dispatcher \
@@ -28,7 +29,7 @@ SUBDIRS = proxy \
retry \
timeout \
udp \
- stream \
+ stream
!if "$(WINRT)" != "yes"
SUBDIRS = $(SUBDIRS) \
diff --git a/cpp/test/Ice/hash/.depend b/cpp/test/Ice/hash/.depend
new file mode 100644
index 00000000000..d48f87cfd5c
--- /dev/null
+++ b/cpp/test/Ice/hash/.depend
@@ -0,0 +1,3 @@
+Client$(OBJEXT): Client.cpp $(includedir)/Ice/Ice.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Initialize.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/PropertiesF.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/Object.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/LoggerF.h $(includedir)/Ice/StatsF.h $(includedir)/Ice/Dispatcher.h $(includedir)/Ice/StringConverter.h $(includedir)/Ice/Plugin.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/Stream.h $(includedir)/IceUtil/Unicode.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/Properties.h $(includedir)/Ice/Outgoing.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/Ice/Logger.h $(includedir)/Ice/LoggerUtil.h $(includedir)/Ice/Stats.h $(includedir)/Ice/Communicator.h $(includedir)/Ice/RouterF.h $(includedir)/Ice/LocatorF.h $(includedir)/Ice/PluginF.h $(includedir)/Ice/ImplicitContextF.h $(includedir)/Ice/CommunicatorAsync.h $(includedir)/Ice/ObjectFactory.h $(includedir)/Ice/ObjectAdapter.h $(includedir)/Ice/FacetMap.h $(includedir)/Ice/Endpoint.h $(includedir)/Ice/ServantLocator.h $(includedir)/Ice/IncomingAsync.h $(includedir)/Ice/Process.h $(includedir)/Ice/Application.h $(includedir)/Ice/Connection.h $(includedir)/Ice/ConnectionAsync.h $(includedir)/Ice/Functional.h $(includedir)/IceUtil/Functional.h $(includedir)/Ice/ImplicitContext.h $(includedir)/Ice/Locator.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/Ice/UserExceptionFactory.h $(includedir)/Ice/ProcessF.h $(includedir)/Ice/Router.h $(includedir)/Ice/DispatchInterceptor.h $(includedir)/Ice/IconvStringConverter.h Test.h ../../include/TestCommon.h $(includedir)/IceUtil/IceUtil.h $(includedir)/IceUtil/AbstractMutex.h $(includedir)/IceUtil/Cache.h $(includedir)/IceUtil/CountDownLatch.h $(includedir)/IceUtil/CtrlCHandler.h $(includedir)/IceUtil/MutexPtrLock.h $(includedir)/IceUtil/RecMutex.h $(includedir)/IceUtil/UUID.h
+Test$(OBJEXT): Test.cpp Test.h $(includedir)/Ice/LocalObjectF.h $(includedir)/IceUtil/Shared.h $(includedir)/IceUtil/Config.h $(includedir)/Ice/Handle.h $(includedir)/IceUtil/Handle.h $(includedir)/IceUtil/Exception.h $(includedir)/Ice/Config.h $(includedir)/Ice/ProxyF.h $(includedir)/Ice/ProxyHandle.h $(includedir)/Ice/ObjectF.h $(includedir)/Ice/Exception.h $(includedir)/Ice/LocalObject.h $(includedir)/Ice/Proxy.h $(includedir)/IceUtil/Mutex.h $(includedir)/IceUtil/Lock.h $(includedir)/IceUtil/ThreadException.h $(includedir)/IceUtil/Time.h $(includedir)/IceUtil/MutexProtocol.h $(includedir)/Ice/ProxyFactoryF.h $(includedir)/Ice/ConnectionIF.h $(includedir)/Ice/RequestHandlerF.h $(includedir)/Ice/EndpointIF.h $(includedir)/Ice/EndpointF.h $(includedir)/IceUtil/ScopedArray.h $(includedir)/Ice/UndefSysMacros.h $(includedir)/Ice/EndpointTypes.h $(includedir)/Ice/ObjectAdapterF.h $(includedir)/Ice/ReferenceF.h $(includedir)/Ice/OutgoingAsync.h $(includedir)/IceUtil/Monitor.h $(includedir)/IceUtil/Cond.h $(includedir)/IceUtil/Timer.h $(includedir)/IceUtil/Thread.h $(includedir)/Ice/OutgoingAsyncF.h $(includedir)/Ice/InstanceF.h $(includedir)/Ice/CommunicatorF.h $(includedir)/Ice/Current.h $(includedir)/Ice/ConnectionF.h $(includedir)/Ice/Identity.h $(includedir)/Ice/BasicStream.h $(includedir)/Ice/ObjectFactoryF.h $(includedir)/Ice/Buffer.h $(includedir)/Ice/Protocol.h $(includedir)/Ice/StreamF.h $(includedir)/Ice/Object.h $(includedir)/Ice/GCShared.h $(includedir)/Ice/GCCountMap.h $(includedir)/Ice/IncomingAsyncF.h $(includedir)/Ice/Outgoing.h $(includedir)/Ice/Incoming.h $(includedir)/Ice/ServantLocatorF.h $(includedir)/Ice/ServantManagerF.h $(includedir)/Ice/Direct.h $(includedir)/Ice/FactoryTableInit.h $(includedir)/Ice/FactoryTable.h $(includedir)/Ice/UserExceptionFactory.h $(includedir)/Ice/LocalException.h $(includedir)/Ice/BuiltinSequences.h $(includedir)/Ice/Stream.h $(includedir)/Ice/ObjectFactory.h $(includedir)/IceUtil/Iterator.h
+Test.h Test.cpp: Test.ice $(SLICE2CPP) $(SLICEPARSERLIB)
diff --git a/cpp/test/Ice/hash/.depend.mak b/cpp/test/Ice/hash/.depend.mak
new file mode 100644
index 00000000000..ebd394b6929
--- /dev/null
+++ b/cpp/test/Ice/hash/.depend.mak
@@ -0,0 +1,3 @@
+Client$(OBJEXT): Client.cpp "$(includedir)/Ice/Ice.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/Ice/Initialize.h" "$(includedir)/Ice/CommunicatorF.h" "$(includedir)/Ice/LocalObjectF.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/Ice/Handle.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/Ice/Config.h" "$(includedir)/Ice/ProxyF.h" "$(includedir)/Ice/ProxyHandle.h" "$(includedir)/Ice/ObjectF.h" "$(includedir)/Ice/Exception.h" "$(includedir)/Ice/LocalObject.h" "$(includedir)/IceUtil/ScopedArray.h" "$(includedir)/Ice/UndefSysMacros.h" "$(includedir)/Ice/PropertiesF.h" "$(includedir)/Ice/Proxy.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/Ice/ProxyFactoryF.h" "$(includedir)/Ice/ConnectionIF.h" "$(includedir)/Ice/RequestHandlerF.h" "$(includedir)/Ice/EndpointIF.h" "$(includedir)/Ice/EndpointF.h" "$(includedir)/Ice/EndpointTypes.h" "$(includedir)/Ice/ObjectAdapterF.h" "$(includedir)/Ice/ReferenceF.h" "$(includedir)/Ice/OutgoingAsync.h" "$(includedir)/IceUtil/Monitor.h" "$(includedir)/IceUtil/Cond.h" "$(includedir)/IceUtil/Timer.h" "$(includedir)/IceUtil/Thread.h" "$(includedir)/Ice/OutgoingAsyncF.h" "$(includedir)/Ice/InstanceF.h" "$(includedir)/Ice/Current.h" "$(includedir)/Ice/ConnectionF.h" "$(includedir)/Ice/Identity.h" "$(includedir)/Ice/BasicStream.h" "$(includedir)/Ice/ObjectFactoryF.h" "$(includedir)/Ice/Buffer.h" "$(includedir)/Ice/Protocol.h" "$(includedir)/Ice/StreamF.h" "$(includedir)/Ice/Object.h" "$(includedir)/Ice/GCShared.h" "$(includedir)/Ice/GCCountMap.h" "$(includedir)/Ice/IncomingAsyncF.h" "$(includedir)/Ice/LoggerF.h" "$(includedir)/Ice/StatsF.h" "$(includedir)/Ice/Dispatcher.h" "$(includedir)/Ice/StringConverter.h" "$(includedir)/Ice/Plugin.h" "$(includedir)/Ice/BuiltinSequences.h" "$(includedir)/Ice/Stream.h" "$(includedir)/IceUtil/Unicode.h" "$(includedir)/Ice/LocalException.h" "$(includedir)/Ice/Properties.h" "$(includedir)/Ice/Outgoing.h" "$(includedir)/Ice/Incoming.h" "$(includedir)/Ice/ServantLocatorF.h" "$(includedir)/Ice/ServantManagerF.h" "$(includedir)/Ice/Direct.h" "$(includedir)/Ice/Logger.h" "$(includedir)/Ice/LoggerUtil.h" "$(includedir)/Ice/Stats.h" "$(includedir)/Ice/Communicator.h" "$(includedir)/Ice/RouterF.h" "$(includedir)/Ice/LocatorF.h" "$(includedir)/Ice/PluginF.h" "$(includedir)/Ice/ImplicitContextF.h" "$(includedir)/Ice/CommunicatorAsync.h" "$(includedir)/Ice/ObjectFactory.h" "$(includedir)/Ice/ObjectAdapter.h" "$(includedir)/Ice/FacetMap.h" "$(includedir)/Ice/Endpoint.h" "$(includedir)/Ice/ServantLocator.h" "$(includedir)/Ice/IncomingAsync.h" "$(includedir)/Ice/Process.h" "$(includedir)/Ice/Application.h" "$(includedir)/Ice/Connection.h" "$(includedir)/Ice/ConnectionAsync.h" "$(includedir)/Ice/Functional.h" "$(includedir)/IceUtil/Functional.h" "$(includedir)/Ice/ImplicitContext.h" "$(includedir)/Ice/Locator.h" "$(includedir)/Ice/FactoryTableInit.h" "$(includedir)/Ice/FactoryTable.h" "$(includedir)/Ice/UserExceptionFactory.h" "$(includedir)/Ice/ProcessF.h" "$(includedir)/Ice/Router.h" "$(includedir)/Ice/DispatchInterceptor.h" "$(includedir)/Ice/IconvStringConverter.h" Test.h ../../include/TestCommon.h "$(includedir)/IceUtil/IceUtil.h" "$(includedir)/IceUtil/AbstractMutex.h" "$(includedir)/IceUtil/Cache.h" "$(includedir)/IceUtil/CountDownLatch.h" "$(includedir)/IceUtil/CtrlCHandler.h" "$(includedir)/IceUtil/MutexPtrLock.h" "$(includedir)/IceUtil/RecMutex.h" "$(includedir)/IceUtil/UUID.h"
+Test$(OBJEXT): Test.cpp Test.h "$(includedir)/Ice/LocalObjectF.h" "$(includedir)/IceUtil/Shared.h" "$(includedir)/IceUtil/Config.h" "$(includedir)/Ice/Handle.h" "$(includedir)/IceUtil/Handle.h" "$(includedir)/IceUtil/Exception.h" "$(includedir)/Ice/Config.h" "$(includedir)/Ice/ProxyF.h" "$(includedir)/Ice/ProxyHandle.h" "$(includedir)/Ice/ObjectF.h" "$(includedir)/Ice/Exception.h" "$(includedir)/Ice/LocalObject.h" "$(includedir)/Ice/Proxy.h" "$(includedir)/IceUtil/Mutex.h" "$(includedir)/IceUtil/Lock.h" "$(includedir)/IceUtil/ThreadException.h" "$(includedir)/IceUtil/Time.h" "$(includedir)/IceUtil/MutexProtocol.h" "$(includedir)/Ice/ProxyFactoryF.h" "$(includedir)/Ice/ConnectionIF.h" "$(includedir)/Ice/RequestHandlerF.h" "$(includedir)/Ice/EndpointIF.h" "$(includedir)/Ice/EndpointF.h" "$(includedir)/IceUtil/ScopedArray.h" "$(includedir)/Ice/UndefSysMacros.h" "$(includedir)/Ice/EndpointTypes.h" "$(includedir)/Ice/ObjectAdapterF.h" "$(includedir)/Ice/ReferenceF.h" "$(includedir)/Ice/OutgoingAsync.h" "$(includedir)/IceUtil/Monitor.h" "$(includedir)/IceUtil/Cond.h" "$(includedir)/IceUtil/Timer.h" "$(includedir)/IceUtil/Thread.h" "$(includedir)/Ice/OutgoingAsyncF.h" "$(includedir)/Ice/InstanceF.h" "$(includedir)/Ice/CommunicatorF.h" "$(includedir)/Ice/Current.h" "$(includedir)/Ice/ConnectionF.h" "$(includedir)/Ice/Identity.h" "$(includedir)/Ice/BasicStream.h" "$(includedir)/Ice/ObjectFactoryF.h" "$(includedir)/Ice/Buffer.h" "$(includedir)/Ice/Protocol.h" "$(includedir)/Ice/StreamF.h" "$(includedir)/Ice/Object.h" "$(includedir)/Ice/GCShared.h" "$(includedir)/Ice/GCCountMap.h" "$(includedir)/Ice/IncomingAsyncF.h" "$(includedir)/Ice/Outgoing.h" "$(includedir)/Ice/Incoming.h" "$(includedir)/Ice/ServantLocatorF.h" "$(includedir)/Ice/ServantManagerF.h" "$(includedir)/Ice/Direct.h" "$(includedir)/Ice/FactoryTableInit.h" "$(includedir)/Ice/FactoryTable.h" "$(includedir)/Ice/UserExceptionFactory.h" "$(includedir)/Ice/LocalException.h" "$(includedir)/Ice/BuiltinSequences.h" "$(includedir)/Ice/Stream.h" "$(includedir)/Ice/ObjectFactory.h" "$(includedir)/IceUtil/Iterator.h"
+Test.h Test.cpp: Test.ice "$(SLICE2CPP)" "$(SLICEPARSERLIB)"
diff --git a/cpp/test/Ice/hash/.gitignore b/cpp/test/Ice/hash/.gitignore
new file mode 100644
index 00000000000..d780341c0e4
--- /dev/null
+++ b/cpp/test/Ice/hash/.gitignore
@@ -0,0 +1,6 @@
+// Generated by makegitignore.py
+
+// IMPORTANT: Do not edit this file -- any edits made here will be lost!
+client
+Test.h
+Test.cpp
diff --git a/cpp/test/Ice/hash/Client.cpp b/cpp/test/Ice/hash/Client.cpp
new file mode 100644
index 00000000000..833ce35dc9d
--- /dev/null
+++ b/cpp/test/Ice/hash/Client.cpp
@@ -0,0 +1,139 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#include <Ice/Ice.h>
+#include <IceUtil/Random.h>
+#include <Test.h>
+#include <TestCommon.h>
+
+using namespace std;
+using namespace Test;
+
+DEFINE_TEST("client")
+
+int main(int argc, char** argv)
+{
+ cout << "testing proxy & endpoint hash algorithm collisions... " << flush;
+ map<Ice::Int, Ice::ObjectPrx> seenProxy;
+ map<Ice::Int, Ice::EndpointPtr> seenEndpoint;
+ unsigned int proxyCollisions = 0;
+ unsigned int endpointCollisions = 0;
+ unsigned int i = 0;
+ unsigned int maxCollisions = 10;
+ unsigned int maxIterations = 10000;
+
+ Ice::InitializationData id;
+ id.properties = Ice::createProperties(argc, argv);
+#ifndef ICE_OS_WINRT
+ //
+ // In Ice for WinRT IceSSL is part of Ice core.
+ //
+ id.properties->setProperty("Ice.Plugin.IceSSL", "IceSSL:createIceSSL");
+#endif
+ Ice::CommunicatorPtr communicator = Ice::initialize(id);
+ for(i = 0; proxyCollisions < maxCollisions &&
+ endpointCollisions < maxCollisions &&
+ i < maxIterations; ++i)
+ {
+ ostringstream os;
+ os << i << ":tcp -p " << IceUtilInternal::random(65536) << " -t 10" << IceUtilInternal::random(1000000)
+ << ":udp -p " << IceUtilInternal::random(65536) << " -h " << IceUtilInternal::random(100);
+
+ Ice::ObjectPrx obj = communicator->stringToProxy(os.str());
+ Ice::EndpointSeq endpoints = obj->ice_getEndpoints();
+ if(!seenProxy.insert(make_pair(obj->ice_getHash(), obj)).second)
+ {
+ ++proxyCollisions;
+ }
+ test(obj->ice_getHash() == obj->ice_getHash());
+
+ for(Ice::EndpointSeq::const_iterator j = endpoints.begin(); j != endpoints.end(); ++j)
+ {
+ Ice::EndpointPtr endpoint = (*j);
+ if(!seenEndpoint.insert(make_pair(endpoint->ice_getHash(), endpoint)).second)
+ {
+ if(endpoint == seenEndpoint[endpoint->ice_getHash()])
+ {
+ continue; // Same object
+ }
+ ++endpointCollisions;
+ }
+ test(endpoint->ice_getHash() == endpoint->ice_getHash());
+ }
+ }
+ test(proxyCollisions < maxCollisions);
+ test(endpointCollisions < maxCollisions);
+
+ //
+ // Check the same proxy produce the same hash, even when we recreate the proxy.
+ //
+ Ice::ObjectPrx prx1 = communicator->stringToProxy("Glacier2/router:tcp -p 10010");
+ Ice::ObjectPrx prx2 = communicator->stringToProxy("Glacier2/router:ssl -p 10011");
+ Ice::ObjectPrx prx3 = communicator->stringToProxy("Glacier2/router:udp -p 10012");
+ Ice::ObjectPrx prx4 = communicator->stringToProxy("Glacier2/router:tcp -h zeroc.com -p 10010");
+ Ice::ObjectPrx prx5 = communicator->stringToProxy("Glacier2/router:ssl -h zeroc.com -p 10011");
+ Ice::ObjectPrx prx6 = communicator->stringToProxy("Glacier2/router:udp -h zeroc.com -p 10012");
+ Ice::ObjectPrx prx7 = communicator->stringToProxy("Glacier2/router:tcp -p 10010 -t 10000");
+ Ice::ObjectPrx prx8 = communicator->stringToProxy("Glacier2/router:ssl -p 10011 -t 10000");
+ Ice::ObjectPrx prx9 = communicator->stringToProxy("Glacier2/router:tcp -h zeroc.com -p 10010 -t 10000");
+ Ice::ObjectPrx prx10 = communicator->stringToProxy("Glacier2/router:ssl -h zeroc.com -p 10011 -t 10000");
+
+ map<string, int> proxyMap;
+ proxyMap["prx1"] = prx1->ice_getHash();
+ proxyMap["prx2"] = prx2->ice_getHash();
+ proxyMap["prx3"] = prx3->ice_getHash();
+ proxyMap["prx4"] = prx4->ice_getHash();
+ proxyMap["prx5"] = prx5->ice_getHash();
+ proxyMap["prx6"] = prx6->ice_getHash();
+ proxyMap["prx7"] = prx7->ice_getHash();
+ proxyMap["prx8"] = prx8->ice_getHash();
+ proxyMap["prx9"] = prx9->ice_getHash();
+ proxyMap["prx10"] = prx10->ice_getHash();
+
+ test( communicator->stringToProxy("Glacier2/router:tcp -p 10010")->ice_getHash() == proxyMap["prx1"]);
+ test( communicator->stringToProxy("Glacier2/router:ssl -p 10011")->ice_getHash() == proxyMap["prx2"]);
+ test( communicator->stringToProxy("Glacier2/router:udp -p 10012")->ice_getHash() == proxyMap["prx3"]);
+ test( communicator->stringToProxy("Glacier2/router:tcp -h zeroc.com -p 10010")->ice_getHash() == proxyMap["prx4"]);
+ test( communicator->stringToProxy("Glacier2/router:ssl -h zeroc.com -p 10011")->ice_getHash() == proxyMap["prx5"]);
+ test( communicator->stringToProxy("Glacier2/router:udp -h zeroc.com -p 10012")->ice_getHash() == proxyMap["prx6"]);
+ test( communicator->stringToProxy("Glacier2/router:tcp -p 10010 -t 10000")->ice_getHash() == proxyMap["prx7"]);
+ test( communicator->stringToProxy("Glacier2/router:ssl -p 10011 -t 10000")->ice_getHash() == proxyMap["prx8"]);
+ test( communicator->stringToProxy("Glacier2/router:tcp -h zeroc.com -p 10010 -t 10000")->ice_getHash() == proxyMap["prx9"]);
+ test( communicator->stringToProxy("Glacier2/router:ssl -h zeroc.com -p 10011 -t 10000")->ice_getHash() == proxyMap["prx10"]);
+
+ cerr << "ok" << endl;
+
+ cout << "testing objects hash algorithm collisions... " << flush;
+ unsigned int objectCollisions = 0;
+ map<Ice::Int, Ice::ObjectPtr> seenObject;
+ for(i = 0; objectCollisions < maxCollisions && i < maxIterations; ++i)
+ {
+ Ice::ObjectPtr obj = new Point;
+ if(!seenObject.insert(make_pair(obj->ice_getHash(), obj)).second)
+ {
+ ++objectCollisions;
+ }
+ test(obj->ice_getHash() == obj->ice_getHash());
+ }
+ test(objectCollisions < maxCollisions);
+
+ cerr << "ok" << endl;
+ if(communicator)
+ {
+ try
+ {
+ communicator->destroy();
+ }
+ catch(const Ice::LocalException& ex)
+ {
+ cerr << ex << endl;
+ }
+ }
+ return EXIT_SUCCESS;
+}
diff --git a/cpp/test/Ice/hash/Makefile b/cpp/test/Ice/hash/Makefile
new file mode 100644
index 00000000000..250beb61bf6
--- /dev/null
+++ b/cpp/test/Ice/hash/Makefile
@@ -0,0 +1,33 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ../../..
+
+CLIENT = client
+
+TARGETS = $(CLIENT)
+
+COBJS = Client.o
+
+OBJS = Test.o
+
+SRCS = $(COBJS:.o=.cpp) \
+ $(OBJS:.o=.cpp)
+
+SLICE_SRCS = Test.ice
+
+include $(top_srcdir)/config/Make.rules
+
+CPPFLAGS := -I. -I../../include $(CPPFLAGS)
+
+$(CLIENT): $(OBJS) $(COBJS)
+ rm -f $@
+ $(CXX) $(LDFLAGS) -o $@ $(COBJS) $(OBJS) $(LIBS)
+
+include .depend
diff --git a/cpp/test/Ice/hash/Makefile.mak b/cpp/test/Ice/hash/Makefile.mak
new file mode 100644
index 00000000000..b231eda718d
--- /dev/null
+++ b/cpp/test/Ice/hash/Makefile.mak
@@ -0,0 +1,49 @@
+# **********************************************************************
+#
+# Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+top_srcdir = ..\..\..
+
+!if "$(WINRT)" != "yes"
+NAME_PREFIX =
+EXT = .exe
+!else
+NAME_PREFIX = Ice_hash_
+EXT = .dll
+!endif
+
+CLIENT = $(NAME_PREFIX)client
+
+TARGETS = $(CLIENT)$(EXT)
+
+COBJS = Test.obj \
+ Client.obj
+
+SRCS = $(COBJS:.obj=.cpp)
+
+!include $(top_srcdir)/config/Make.rules.mak
+
+CPPFLAGS = -I. -I../../include $(CPPFLAGS) -DWIN32_LEAN_AND_MEAN
+
+
+!if "$(WINRT)" != "yes"
+LD_TESTFLAGS = $(LD_EXEFLAGS) $(SETARGV)
+!else
+LD_TESTFLAGS = $(LD_DLLFLAGS) /export:dllMain
+!endif
+
+!if "$(GENERATE_PDB)" == "yes"
+CPDBFLAGS = /pdb:$(CLIENT).pdb
+!endif
+
+$(CLIENT)$(EXT): $(COBJS)
+ $(LINK) $(LD_TESTFLAGS) $(CPDBFLAGS) $(SETARGV) $(COBJS) $(PREOUT)$@ $(PRELIBS)$(LIBS)
+ @if exist $@.manifest echo ^ ^ ^ Embedding manifest using $(MT) && \
+ $(MT) -nologo -manifest $@.manifest -outputresource:$@;#1 && del /q $@.manifest
+
+!include .depend.mak
diff --git a/cpp/test/Ice/hash/Test.ice b/cpp/test/Ice/hash/Test.ice
new file mode 100644
index 00000000000..0bc77e005b6
--- /dev/null
+++ b/cpp/test/Ice/hash/Test.ice
@@ -0,0 +1,20 @@
+// **********************************************************************
+//
+// Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+//
+// This copy of Ice is licensed to you under the terms described in the
+// ICE_LICENSE file included in this distribution.
+//
+// **********************************************************************
+
+#pragma once
+
+module Test
+{
+
+class Point
+{
+};
+
+};
+
diff --git a/cpp/test/Ice/hash/run.py b/cpp/test/Ice/hash/run.py
new file mode 100755
index 00000000000..3c4472ca289
--- /dev/null
+++ b/cpp/test/Ice/hash/run.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+# **********************************************************************
+#
+# Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
+#
+# This copy of Ice is licensed to you under the terms described in the
+# ICE_LICENSE file included in this distribution.
+#
+# **********************************************************************
+
+import os, sys
+
+path = [ ".", "..", "../..", "../../..", "../../../.." ]
+head = os.path.dirname(sys.argv[0])
+if len(head) > 0:
+ path = [os.path.join(head, p) for p in path]
+path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ]
+if len(path) == 0:
+ raise "can't find toplevel directory!"
+sys.path.append(os.path.join(path[0]))
+from scripts import *
+
+client = os.path.join(os.getcwd(), "client")
+TestUtil.simpleTest(client)
+
diff --git a/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
index a572f49a96f..1b36c721576 100644
--- a/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
+++ b/cpp/test/WinRT/TestSuite/MainPage.xaml.cpp
@@ -300,7 +300,8 @@ static const TestCase allTest[] =
{"Ice\\retry", "Ice_retry_", "client.dll", "server.dll", 0, 0 },
{"Ice\\stream", "Ice_stream_", "client.dll", 0, 0, 0},
{"Ice\\timeout", "Ice_timeout_", "client.dll", "server.dll", 0, 0 },
- {"Ice\\udp", "Ice_udp_", "client.dll", "server.dll", 0, 0 }
+ {"Ice\\udp", "Ice_udp_", "client.dll", "server.dll", 0, 0 },
+ {"Ice\\hash", "Ice_hash_", "client.dll", 0, 0, 0}
};
class TestRunner : public IceUtil::Thread
diff --git a/cpp/test/WinRT/TestSuite/TestSuite.vcxproj b/cpp/test/WinRT/TestSuite/TestSuite.vcxproj
index 3e6321b9bc0..ee8bd766392 100644
--- a/cpp/test/WinRT/TestSuite/TestSuite.vcxproj
+++ b/cpp/test/WinRT/TestSuite/TestSuite.vcxproj
@@ -227,6 +227,9 @@
<None Include="..\..\Ice\facets\Ice_facets_server.dll">
<DeploymentContent>true</DeploymentContent>
</None>
+ <None Include="..\..\Ice\hash\Ice_hash_client.dll">
+ <DeploymentContent>true</DeploymentContent>
+ </None>
<None Include="..\..\Ice\hold\Ice_hold_client.dll">
<DeploymentContent>true</DeploymentContent>
</None>
diff --git a/cpp/test/WinRT/TestSuite/TestSuite.vcxproj.filters b/cpp/test/WinRT/TestSuite/TestSuite.vcxproj.filters
index a265ba6d68e..05791395699 100644
--- a/cpp/test/WinRT/TestSuite/TestSuite.vcxproj.filters
+++ b/cpp/test/WinRT/TestSuite/TestSuite.vcxproj.filters
@@ -196,6 +196,9 @@
<Filter>Tests</Filter>
</None>
<None Include="key.pfx" />
+ <None Include="..\..\Ice\hash\Ice_hash_client.dll">
+ <Filter>Tests</Filter>
+ </None>
</ItemGroup>
<ItemGroup>
<Page Include="MainPage.xaml" />