summaryrefslogtreecommitdiff
path: root/ruby/test
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 /ruby/test
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 'ruby/test')
-rw-r--r--ruby/test/Ice/optional/AllTests.rb12
-rw-r--r--ruby/test/Ice/optional/Test.ice20
2 files changed, 32 insertions, 0 deletions
diff --git a/ruby/test/Ice/optional/AllTests.rb b/ruby/test/Ice/optional/AllTests.rb
index 1a4990314b2..fd045400b57 100644
--- a/ruby/test/Ice/optional/AllTests.rb
+++ b/ruby/test/Ice/optional/AllTests.rb
@@ -318,6 +318,18 @@ def allTests(communicator)
outer = Test::Recursive.new
outer.value = recursive1
initial.pingPong(outer)
+
+
+ g = Test::G.new
+ g.gg1Opt = Test::G1.new("gg1Opt")
+ g.gg2 = Test::G2.new(10)
+ g.gg2Opt = Test::G2.new(20)
+ g.gg1 = Test::G1.new("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")
puts "ok"
diff --git a/ruby/test/Ice/optional/Test.ice b/ruby/test/Ice/optional/Test.ice
index 65bbbaa18e9..cbcb417aebb 100644
--- a/ruby/test/Ice/optional/Test.ice
+++ b/ruby/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();