diff options
Diffstat (limited to 'ruby')
-rw-r--r-- | ruby/test/Ice/scope/AllTests.rb | 11 | ||||
-rw-r--r-- | ruby/test/Ice/scope/Test.ice | 35 |
2 files changed, 45 insertions, 1 deletions
diff --git a/ruby/test/Ice/scope/AllTests.rb b/ruby/test/Ice/scope/AllTests.rb index 3d339869b15..78797e5bd7f 100644 --- a/ruby/test/Ice/scope/AllTests.rb +++ b/ruby/test/Ice/scope/AllTests.rb @@ -4,7 +4,7 @@ def allTests(helper, communicator) - print "test same Slice type name in different scopes... " + print "test using same type name in different Slice modules... " STDOUT.flush i1 = Test::IPrx::checkedCast(communicator.stringToProxy("i1:#{helper.getTestEndpoint()}")) @@ -41,6 +41,15 @@ def allTests(helper, communicator) test(cmap2["a"].s == s1) test(cmap3["a"].s == s1) + e = i1.opE1(Test::E1::V1) + test(e == Test::E1::V1) + + s = i1.opS1(Test::S1.new("S1")) + test(s.s == "S1") + + c = i1.opC1(Test::C1.new("C1")) + test(c.s == "C1") + i2 = Test::Inner::Inner2::IPrx::checkedCast(communicator.stringToProxy("i2:#{helper.getTestEndpoint()}")) s1 = Test::Inner::Inner2::S.new(0) diff --git a/ruby/test/Ice/scope/Test.ice b/ruby/test/Ice/scope/Test.ice index e2197329562..011badcf15b 100644 --- a/ruby/test/Ice/scope/Test.ice +++ b/ruby/test/Ice/scope/Test.ice @@ -22,6 +22,37 @@ module Test dictionary<string, C> CMap; sequence<C> CSeq; + enum E1 + { + v1, + v2, + v3 + } + + struct S1 + { + string s; + } + + class C1 + { + string s; + } + + struct S2 + { + E1 E1; + S1 S1; + C1 C1; + } + + class C2 + { + E1 E1; + S1 S1; + C1 C1; + } + interface I { S opS(S s1, out S s2); @@ -32,6 +63,10 @@ module Test CSeq opCSeq(CSeq s1, out CSeq s2); CMap opCMap(CMap c1, out CMap c2); + E1 opE1(E1 E1); + S1 opS1(S1 S1); + C1 opC1(C1 C1); + void shutdown(); } |