diff options
author | Jose <jose@zeroc.com> | 2019-07-30 12:45:29 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-07-31 13:13:40 +0200 |
commit | 3e71d9e1a29bc8169452b039bb723406ff8ef0fe (patch) | |
tree | cfde39529b1a21d6f4c4e87b2a92a366eafc9993 /python | |
parent | Update .npmignore to ignore .tgz files (diff) | |
download | ice-3e71d9e1a29bc8169452b039bb723406ff8ef0fe.tar.bz2 ice-3e71d9e1a29bc8169452b039bb723406ff8ef0fe.tar.xz ice-3e71d9e1a29bc8169452b039bb723406ff8ef0fe.zip |
Fixes for C++ & Swift generated code - Close #458
Diffstat (limited to 'python')
-rw-r--r-- | python/test/Ice/scope/AllTests.py | 11 | ||||
-rwxr-xr-x | python/test/Ice/scope/Server.py | 9 | ||||
-rw-r--r-- | python/test/Ice/scope/Test.ice | 35 |
3 files changed, 54 insertions, 1 deletions
diff --git a/python/test/Ice/scope/AllTests.py b/python/test/Ice/scope/AllTests.py index d57d6fd85d4..d60e19cd945 100644 --- a/python/test/Ice/scope/AllTests.py +++ b/python/test/Ice/scope/AllTests.py @@ -11,7 +11,7 @@ def test(b): def allTests(helper, communicator): - sys.stdout.write("test same Slice type name in different scopes... ") + sys.stdout.write("test using same type name in different Slice modules... ") sys.stdout.flush() i1 = Test.IPrx.checkedCast(communicator.stringToProxy("i1:{0}".format(helper.getTestEndpoint()))) @@ -52,6 +52,15 @@ def allTests(helper, communicator): test(cmap2["a"].s == s1) test(cmap3["a"].s == s1) + e = i1.opE1(Test.E1.v1) + test(e == Test.E1.v1) + + s = i1.opS1(Test.S1("S1")) + test(s.s == "S1") + + c = i1.opC1(Test.C1("C1")) + test(c.s == "C1") + i2 = Test.Inner.Inner2.IPrx.checkedCast(communicator.stringToProxy("i2:{0}".format(helper.getTestEndpoint()))) s1 = Test.Inner.Inner2.S(0) diff --git a/python/test/Ice/scope/Server.py b/python/test/Ice/scope/Server.py index e322bd18640..bccd9646b9d 100755 --- a/python/test/Ice/scope/Server.py +++ b/python/test/Ice/scope/Server.py @@ -30,6 +30,15 @@ class I1(Test.I): def opCMap(self, cmap1, current=None): return (cmap1, cmap1) + def opE1(self, e1, current=None): + return e1 + + def opS1(self, s1, current=None): + return s1 + + def opC1(self, c1, current=None): + return c1 + def shutdown(self, current=None): current.adapter.getCommunicator().shutdown() diff --git a/python/test/Ice/scope/Test.ice b/python/test/Ice/scope/Test.ice index e2197329562..011badcf15b 100644 --- a/python/test/Ice/scope/Test.ice +++ b/python/test/Ice/scope/Test.ice @@ -22,6 +22,37 @@ module Test dictionary<string, C> CMap; sequence<C> CSeq; + enum E1 + { + v1, + v2, + v3 + } + + struct S1 + { + string s; + } + + class C1 + { + string s; + } + + struct S2 + { + E1 E1; + S1 S1; + C1 C1; + } + + class C2 + { + E1 E1; + S1 S1; + C1 C1; + } + interface I { S opS(S s1, out S s2); @@ -32,6 +63,10 @@ module Test CSeq opCSeq(CSeq s1, out CSeq s2); CMap opCMap(CMap c1, out CMap c2); + E1 opE1(E1 E1); + S1 opS1(S1 S1); + C1 opC1(C1 C1); + void shutdown(); } |