summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-04-26 09:00:57 +0200
committerBenoit Foucher <benoit@zeroc.com>2016-04-26 09:00:57 +0200
commitc2ce37b7b0f6fc033cac4d52d460ee2f389d7737 (patch)
treedab204bc1dfd9298c7acb13b9493a210f8c4e978 /python
parentAdd jquery-cookie to bower dependency (diff)
downloadice-c2ce37b7b0f6fc033cac4d52d460ee2f389d7737.tar.bz2
ice-c2ce37b7b0f6fc033cac4d52d460ee2f389d7737.tar.xz
ice-c2ce37b7b0f6fc033cac4d52d460ee2f389d7737.zip
Fixed ICE-7115 - unmarshalling bug with optional parameters
Diffstat (limited to 'python')
-rw-r--r--python/test/Ice/optional/AllTests.py5
-rw-r--r--python/test/Ice/optional/ClientPrivate.ice2
-rwxr-xr-xpython/test/Ice/optional/Server.py5
-rwxr-xr-xpython/test/Ice/optional/ServerAMD.py5
-rw-r--r--python/test/Ice/optional/Test.ice4
-rw-r--r--python/test/Ice/optional/TestAMD.ice4
6 files changed, 20 insertions, 5 deletions
diff --git a/python/test/Ice/optional/AllTests.py b/python/test/Ice/optional/AllTests.py
index 574727ab386..e2c20f64783 100644
--- a/python/test/Ice/optional/AllTests.py
+++ b/python/test/Ice/optional/AllTests.py
@@ -324,7 +324,7 @@ 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)
@@ -336,6 +336,9 @@ def allTests(communicator):
test(r.gg2Opt.a == 20)
test(r.gg1.a == "gg1")
+ initial2 = Test.Initial2Prx.uncheckedCast(base)
+ initial2.opVoid(15, "test")
+
print("ok")
sys.stdout.write("testing marshaling of large containers with fixed size elements... ")
diff --git a/python/test/Ice/optional/ClientPrivate.ice b/python/test/Ice/optional/ClientPrivate.ice
index 9a173d452e1..5dd08613b9a 100644
--- a/python/test/Ice/optional/ClientPrivate.ice
+++ b/python/test/Ice/optional/ClientPrivate.ice
@@ -32,6 +32,8 @@ class D extends B
class Initial2
{
void opClassAndUnknownOptional(A p, optional(1) Object o);
+
+ void opVoid(optional(1) int a, optional(2) string v);
};
};
diff --git a/python/test/Ice/optional/Server.py b/python/test/Ice/optional/Server.py
index 928b6c2c1d9..eba7e7ccad6 100755
--- a/python/test/Ice/optional/Server.py
+++ b/python/test/Ice/optional/Server.py
@@ -137,10 +137,13 @@ class InitialI(Test.Initial):
def returnOptionalClass(self, req, current=None):
return Test.OneOptional(5)
-
+
def opG(self, g, current=None):
return g
+ def opVoid(self, current=None):
+ pass
+
def supportsRequiredParams(self, current=None):
return False
diff --git a/python/test/Ice/optional/ServerAMD.py b/python/test/Ice/optional/ServerAMD.py
index fb00aa09330..97ae0ce268e 100755
--- a/python/test/Ice/optional/ServerAMD.py
+++ b/python/test/Ice/optional/ServerAMD.py
@@ -138,10 +138,13 @@ 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 opVoid_async(self, cb, current=None):
+ cb.ice_response()
+
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 733df305369..503483b5c1a 100644
--- a/python/test/Ice/optional/Test.ice
+++ b/python/test/Ice/optional/Test.ice
@@ -276,9 +276,11 @@ class Initial
void sendOptionalClass(bool req, optional(1) OneOptional o);
void returnOptionalClass(bool req, out optional(1) OneOptional o);
-
+
G opG(G g);
+ void opVoid();
+
bool supportsRequiredParams();
bool supportsJavaSerializable();
diff --git a/python/test/Ice/optional/TestAMD.ice b/python/test/Ice/optional/TestAMD.ice
index 60d86a247d9..ae7a8a57dab 100644
--- a/python/test/Ice/optional/TestAMD.ice
+++ b/python/test/Ice/optional/TestAMD.ice
@@ -277,9 +277,11 @@ class Initial
void sendOptionalClass(bool req, optional(1) OneOptional o);
void returnOptionalClass(bool req, out optional(1) OneOptional o);
-
+
G opG(G g);
+ void opVoid();
+
bool supportsRequiredParams();
bool supportsJavaSerializable();