diff options
author | Mark Spruiell <mes@zeroc.com> | 2012-11-28 18:47:24 -0800 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2012-11-28 18:47:24 -0800 |
commit | 9fb578ab0af6565d6dc3e97eb1fbfdfe8623f0cb (patch) | |
tree | c40730351fbaca97f8ac7b9b15ff6d3b24ef50e7 /py/test/Slice/structure/Client.py | |
parent | ICE-5018 - Python3 failure in py/test/Slice/structure (diff) | |
download | ice-9fb578ab0af6565d6dc3e97eb1fbfdfe8623f0cb.tar.bz2 ice-9fb578ab0af6565d6dc3e97eb1fbfdfe8623f0cb.tar.xz ice-9fb578ab0af6565d6dc3e97eb1fbfdfe8623f0cb.zip |
ICE-5018 - more fixes for Python mapping
Diffstat (limited to 'py/test/Slice/structure/Client.py')
-rwxr-xr-x | py/test/Slice/structure/Client.py | 44 |
1 files changed, 43 insertions, 1 deletions
diff --git a/py/test/Slice/structure/Client.py b/py/test/Slice/structure/Client.py index c94199c3ac0..f44090fbb70 100755 --- a/py/test/Slice/structure/Client.py +++ b/py/test/Slice/structure/Client.py @@ -41,7 +41,7 @@ def allTests(communicator): test(Test.S2() == Test.S2()) # - # Change one primitive member at a time. + # Change one member at a time. # v = copy.copy(def_s2) test(v == def_s2) @@ -143,6 +143,48 @@ def allTests(communicator): v2.s = None test(v1 != v2) + # + # Define some default values. + # + def_s3 = Test.S3(Test.C("name"), {"1":"2"}, communicator.stringToProxy("test")) + + # + # Compare default-constructed structures. + # + test(Test.S3() == Test.S3()) + + # + # Change one member at a time. + # + v1 = copy.copy(def_s3) + test(v1 == def_s3) + + v1.obj = None + test(v1 != def_s3) + + v1.obj = Test.C("name") + test(v1 != def_s3) + + v1 = copy.copy(def_s3) + v1.sd = copy.copy(def_s3.sd) + test(v1 == def_s3) + + v1.sd = None + test(v1 != def_s3) + + v1.sd = {"1":"3"} + test(v1 != def_s3) + + v1 = copy.copy(def_s3) + v1.prx = None + test(v1 != def_s3) + + v1.prx = communicator.stringToProxy("test") + test(v1 == def_s3) + + v1.prx = communicator.stringToProxy("test2") + test(v1 != def_s3) + print("ok") def run(args, communicator): |