summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-06-16 16:12:59 +0200
committerJose <jose@zeroc.com>2015-06-16 16:12:59 +0200
commit0fe91035e5d1f074c011a9489d9113cea8f17008 (patch)
tree5155aa107a49696407bc5c5a190899275bd7c9f6 /python
parentFixed ICE-6594: IceGrid/replication test failure (diff)
downloadice-0fe91035e5d1f074c011a9489d9113cea8f17008.tar.bz2
ice-0fe91035e5d1f074c011a9489d9113cea8f17008.tar.xz
ice-0fe91035e5d1f074c011a9489d9113cea8f17008.zip
Fixed ICE-6602: optionals marshaling bug
Diffstat (limited to 'python')
-rw-r--r--python/test/Ice/optional/AllTests.py11
-rwxr-xr-xpython/test/Ice/optional/Server.py3
-rwxr-xr-xpython/test/Ice/optional/ServerAMD.py3
-rw-r--r--python/test/Ice/optional/Test.ice20
-rw-r--r--python/test/Ice/optional/TestAMD.ice20
5 files changed, 57 insertions, 0 deletions
diff --git a/python/test/Ice/optional/AllTests.py b/python/test/Ice/optional/AllTests.py
index 051e415e9f4..e84b06a6a2d 100644
--- a/python/test/Ice/optional/AllTests.py
+++ b/python/test/Ice/optional/AllTests.py
@@ -324,6 +324,17 @@ def allTests(communicator):
outer = Test.Recursive()
outer.value = recursive1
initial.pingPong(outer)
+
+ g = Test.G()
+ g.gg1Opt = Test.G1("gg1Opt")
+ g.gg2 = Test.G2(10)
+ g.gg2Opt = Test.G2(20)
+ g.gg1 = Test.G1("gg1")
+ r = initial.opG(g)
+ test(r.gg1Opt.a == "gg1Opt")
+ test(r.gg2.a == 10)
+ test(r.gg2Opt.a == 20)
+ test(r.gg1.a == "gg1")
print("ok")
diff --git a/python/test/Ice/optional/Server.py b/python/test/Ice/optional/Server.py
index 1533bd38b70..94e4886020d 100755
--- a/python/test/Ice/optional/Server.py
+++ b/python/test/Ice/optional/Server.py
@@ -137,6 +137,9 @@ class InitialI(Test.Initial):
def returnOptionalClass(self, req, current=None):
return Test.OneOptional(5)
+
+ def opG(self, g, current=None):
+ return g
def supportsRequiredParams(self, current=None):
return False
diff --git a/python/test/Ice/optional/ServerAMD.py b/python/test/Ice/optional/ServerAMD.py
index edf6701cb0e..ce6081e070c 100755
--- a/python/test/Ice/optional/ServerAMD.py
+++ b/python/test/Ice/optional/ServerAMD.py
@@ -138,6 +138,9 @@ class InitialI(Test.Initial):
def returnOptionalClass_async(self, cb, req, current=None):
cb.ice_response(Test.OneOptional(5))
+
+ def opG_async(self, cb, g, current=None):
+ cb.ice_response(g)
def supportsRequiredParams_async(self, cb, current=None):
cb.ice_response(False)
diff --git a/python/test/Ice/optional/Test.ice b/python/test/Ice/optional/Test.ice
index 2a3d25720b6..f404a231370 100644
--- a/python/test/Ice/optional/Test.ice
+++ b/python/test/Ice/optional/Test.ice
@@ -171,6 +171,24 @@ class F extends E
optional(1) A af;
};
+class G1
+{
+ string a;
+};
+
+class G2
+{
+ long a;
+};
+
+class G
+{
+ optional(1) G1 gg1Opt;
+ G2 gg2;
+ optional(0) G2 gg2Opt;
+ G1 gg1;
+};
+
class Recursive;
sequence<Recursive> RecursiveSeq;
@@ -258,6 +276,8 @@ class Initial
void sendOptionalClass(bool req, optional(1) OneOptional o);
void returnOptionalClass(bool req, out optional(1) OneOptional o);
+
+ G opG(G g);
bool supportsRequiredParams();
diff --git a/python/test/Ice/optional/TestAMD.ice b/python/test/Ice/optional/TestAMD.ice
index cf6c62ee7f1..bb14fd5c2fa 100644
--- a/python/test/Ice/optional/TestAMD.ice
+++ b/python/test/Ice/optional/TestAMD.ice
@@ -171,6 +171,24 @@ class F extends E
optional(1) A af;
};
+class G1
+{
+ string a;
+};
+
+class G2
+{
+ long a;
+};
+
+class G
+{
+ optional(1) G1 gg1Opt;
+ G2 gg2;
+ optional(0) G2 gg2Opt;
+ G1 gg1;
+};
+
class Recursive;
sequence<Recursive> RecursiveSeq;
@@ -259,6 +277,8 @@ class Initial
void sendOptionalClass(bool req, optional(1) OneOptional o);
void returnOptionalClass(bool req, out optional(1) OneOptional o);
+
+ G opG(G g);
bool supportsRequiredParams();