summaryrefslogtreecommitdiff
path: root/py/test/Slice/structure/Client.py
diff options
context:
space:
mode:
Diffstat (limited to 'py/test/Slice/structure/Client.py')
-rwxr-xr-xpy/test/Slice/structure/Client.py44
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):