diff options
Diffstat (limited to 'python/test/Ice/proxy/AllTests.py')
-rw-r--r-- | python/test/Ice/proxy/AllTests.py | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/python/test/Ice/proxy/AllTests.py b/python/test/Ice/proxy/AllTests.py index bd889945639..6e04cc674fa 100644 --- a/python/test/Ice/proxy/AllTests.py +++ b/python/test/Ice/proxy/AllTests.py @@ -358,10 +358,35 @@ def allTests(communicator, collocated): sys.stdout.write("testing proxy methods... ") sys.stdout.flush() + + test(communicator.identityToString(base.ice_identity(communicator.stringToIdentity("other")).ice_getIdentity()) \ == "other") - test(Ice.identityToString(base.ice_identity(Ice.stringToIdentity("other")).ice_getIdentity()) == "other") - + + # + # Verify that ToStringMode is passed correctly + # + ident = Ice.Identity("test", "\x7F\xE2\x82\xAC") + + idStr = Ice.identityToString(ident, Ice.ToStringMode.Unicode) + test(idStr == "\\u007f\xE2\x82\xAC/test") + ident2 = Ice.stringToIdentity(idStr) + test(ident == ident2) + test(Ice.identityToString(ident) == idStr) + + idStr = Ice.identityToString(ident, Ice.ToStringMode.ASCII) + test(idStr == "\\u007f\\u20ac/test") + ident2 = Ice.stringToIdentity(idStr) + test(ident == ident2) + + idStr = Ice.identityToString(ident, Ice.ToStringMode.Compat) + test(idStr == "\\177\\342\\202\\254/test") + ident2 = Ice.stringToIdentity(idStr) + test(ident == ident2) + + ident2 = Ice.stringToIdentity(communicator.identityToString(ident)) + test(ident == ident2) + test(base.ice_facet("facet").ice_getFacet() == "facet") test(base.ice_adapterId("id").ice_getAdapterId() == "id") test(base.ice_twoway().ice_isTwoway()) |