summaryrefslogtreecommitdiff
path: root/csharp/test
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 /csharp/test
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 'csharp/test')
-rw-r--r--csharp/test/Ice/optional/AllTests.cs14
-rw-r--r--csharp/test/Ice/optional/Test.ice4
-rw-r--r--csharp/test/Ice/optional/TestAMD.ice4
-rw-r--r--csharp/test/Ice/optional/TestAMDI.cs7
-rw-r--r--csharp/test/Ice/optional/TestI.cs6
5 files changed, 30 insertions, 5 deletions
diff --git a/csharp/test/Ice/optional/AllTests.cs b/csharp/test/Ice/optional/AllTests.cs
index d391ce340f2..5ede1eb40a4 100644
--- a/csharp/test/Ice/optional/AllTests.cs
+++ b/csharp/test/Ice/optional/AllTests.cs
@@ -444,7 +444,19 @@ public class AllTests : TestCommon.TestApp
test(10 == g.gg2.a);
test(20 == g.gg2Opt.Value.a);
test("gg1".Equals(g.gg1.a));
-
+
+ initial.opVoid();
+
+ os = Ice.Util.createOutputStream(communicator);
+ os.startEncapsulation();
+ os.writeOptional(1, Ice.OptionalFormat.F4);
+ os.writeInt(15);
+ os.writeOptional(1, Ice.OptionalFormat.VSize);
+ os.writeString("test");
+ os.endEncapsulation();
+ inEncaps = os.finished();
+ test(initial.ice_invoke("opVoid", Ice.OperationMode.Normal, inEncaps, out outEncaps));
+
WriteLine("ok");
Write("testing marshaling of large containers with fixed size elements... ");
diff --git a/csharp/test/Ice/optional/Test.ice b/csharp/test/Ice/optional/Test.ice
index d4db71c76e1..99d1bc7558f 100644
--- a/csharp/test/Ice/optional/Test.ice
+++ b/csharp/test/Ice/optional/Test.ice
@@ -282,9 +282,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/csharp/test/Ice/optional/TestAMD.ice b/csharp/test/Ice/optional/TestAMD.ice
index a2d50d70352..e8e4fab4cb7 100644
--- a/csharp/test/Ice/optional/TestAMD.ice
+++ b/csharp/test/Ice/optional/TestAMD.ice
@@ -282,9 +282,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/csharp/test/Ice/optional/TestAMDI.cs b/csharp/test/Ice/optional/TestAMDI.cs
index 66aab304e71..05475175e1e 100644
--- a/csharp/test/Ice/optional/TestAMDI.cs
+++ b/csharp/test/Ice/optional/TestAMDI.cs
@@ -254,12 +254,17 @@ public class InitialI : Test.Initial
{
cb.ice_response(new Test.OneOptional(53));
}
-
+
public override void opG_async(Test.AMD_Initial_opG cb, Test.G g, Ice.Current current)
{
cb.ice_response(g);
}
+ public override void opVoid_async(Test.AMD_Initial_opVoid cb, Ice.Current current)
+ {
+ cb.ice_response();
+ }
+
public override void supportsRequiredParams_async(Test.AMD_Initial_supportsRequiredParams cb, Ice.Current current)
{
cb.ice_response(false);
diff --git a/csharp/test/Ice/optional/TestI.cs b/csharp/test/Ice/optional/TestI.cs
index 10a2a08109a..13b3d59e8e1 100644
--- a/csharp/test/Ice/optional/TestI.cs
+++ b/csharp/test/Ice/optional/TestI.cs
@@ -291,12 +291,16 @@ public class InitialI : Test.Initial
{
o = new Test.OneOptional(53);
}
-
+
public override Test.G opG(Test.G g, Ice.Current current)
{
return g;
}
+ public override void opVoid(Ice.Current current)
+ {
+ }
+
public override bool supportsRequiredParams(Ice.Current current)
{
return false;