diff options
author | Jose <jose@zeroc.com> | 2018-09-20 14:14:45 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2018-09-20 14:14:45 +0200 |
commit | 260b8bf8523164f68bdf97d469616cbf01c71cc0 (patch) | |
tree | 102ff9d0f45ae66a0c38dc02aa03cbf054c65358 /ruby | |
parent | Merge branch '3.7.1-xcode10' into 3.7 (diff) | |
download | ice-260b8bf8523164f68bdf97d469616cbf01c71cc0.tar.bz2 ice-260b8bf8523164f68bdf97d469616cbf01c71cc0.tar.xz ice-260b8bf8523164f68bdf97d469616cbf01c71cc0.zip |
Test using Value as operation parameter
Fix a bug in slice2java that generate bogus code or using
Value as an Slice operation parameter
Fix a bug in JavaScript mapping that cause a run-time error
when invoking an operation that defines Value as an input
parameter
Diffstat (limited to 'ruby')
-rw-r--r-- | ruby/test/Ice/objects/AllTests.rb | 25 | ||||
-rw-r--r-- | ruby/test/Ice/objects/Test.ice | 21 |
2 files changed, 45 insertions, 1 deletions
diff --git a/ruby/test/Ice/objects/AllTests.rb b/ruby/test/Ice/objects/AllTests.rb index c5c0e7a63bf..a41df03cb91 100644 --- a/ruby/test/Ice/objects/AllTests.rb +++ b/ruby/test/Ice/objects/AllTests.rb @@ -219,6 +219,31 @@ def allTests(helper, communicator) test(i) puts "ok" + print "getting K... " + STDOUT.flush + k = initial.getK() + test(k.value.data == "l") + puts "ok" + + print "testing Value as parameter... " + STDOUT.flush + v1 = Test::L.new("l") + v2, v3 = initial.opValue(v1) + test(v2.data == "l") + test(v3.data == "l") + + v1 = [Test::L.new("l")] + v2, v3 = initial.opValueSeq(v1) + test(v2[0].data == "l") + test(v3[0].data == "l") + + v1 = {} + v1["l"] = Test::L.new("l") + v2, v3 = initial.opValueMap(v1) + test(v2["l"].data == "l") + test(v3["l"].data == "l") + puts "ok" + print "getting D1... " STDOUT.flush d1 = initial.getD1(Test::D1.new(Test::A1.new("a1"), Test::A1.new("a2"), Test::A1.new("a3"), Test::A1.new("a4"))) diff --git a/ruby/test/Ice/objects/Test.ice b/ruby/test/Ice/objects/Test.ice index bf3d70ca9be..2f31f0f930d 100644 --- a/ruby/test/Ice/objects/Test.ice +++ b/ruby/test/Ice/objects/Test.ice @@ -142,6 +142,19 @@ class Recursive Recursive v; } +class K +{ + Value value; +} + +class L +{ + string data; +} + +sequence<Value> ValueSeq; +dictionary<string, Value> ValueMap; + class Initial { void shutdown(); @@ -160,9 +173,15 @@ class Initial void getAll(out B b1, out B b2, out C theC, out D theD); + I getH(); I getI(); I getJ(); - I getH(); + + K getK(); + + Value opValue(Value v1, out Value v2); + ValueSeq opValueSeq(ValueSeq v1, out ValueSeq v2); + ValueMap opValueMap(ValueMap v1, out ValueMap v2); D1 getD1(D1 d1); void throwEDerived() throws EDerived; |