diff options
Diffstat (limited to 'ruby/test/Ice/exceptions/AllTests.rb')
-rw-r--r-- | ruby/test/Ice/exceptions/AllTests.rb | 66 |
1 files changed, 28 insertions, 38 deletions
diff --git a/ruby/test/Ice/exceptions/AllTests.rb b/ruby/test/Ice/exceptions/AllTests.rb index b74723e1d6c..edc58748117 100644 --- a/ruby/test/Ice/exceptions/AllTests.rb +++ b/ruby/test/Ice/exceptions/AllTests.rb @@ -19,13 +19,7 @@ class ValueFactoryI end end -def allTests(communicator) - platformInfo = RUBY_PLATFORM.split("-") - isWin32 = false - if platformInfo.length >= 2 && platformInfo[1] == "mswin32" - isWin32 = true - end - +def allTests(helper, communicator) print "testing value factory registration exception... " STDOUT.flush vf = ValueFactoryI.new @@ -39,7 +33,7 @@ def allTests(communicator) print "testing stringToProxy... " STDOUT.flush - ref = "thrower:default -p 12010" + ref = "thrower:#{helper.getTestEndpoint()}" base = communicator.stringToProxy(ref) test(base) puts "ok" @@ -110,22 +104,20 @@ def allTests(communicator) # # We cannot invoke throwModA if the server was built with VC6. # - if !isWin32 - begin - thrower.throwModA(1, 2) - test(false) - rescue Test::Mod::A => ex - test(ex.aMem == 1) - test(ex.a2Mem == 2) - rescue Ice::OperationNotExistException - # - # This operation is not supported in Java. - # - rescue - print $! - print $!.backtrace.join("\n") - test(false) - end + begin + thrower.throwModA(1, 2) + test(false) + rescue Test::Mod::A => ex + test(ex.aMem == 1) + test(ex.a2Mem == 2) + rescue Ice::OperationNotExistException + # + # This operation is not supported in Java. + # + rescue + print $! + print $!.backtrace.join("\n") + test(false) end puts "ok" @@ -157,20 +149,18 @@ def allTests(communicator) # # We cannot invoke throwModA if the server was built with VC6. # - if !isWin32 - begin - thrower.throwModA(1, 2) - test(false) - rescue Test::A => ex - test(ex.aMem == 1) - rescue Ice::OperationNotExistException - # - # This operation is not supported in Java. - # - rescue - print $!.backtrace.join("\n") - test(false) - end + begin + thrower.throwModA(1, 2) + test(false) + rescue Test::A => ex + test(ex.aMem == 1) + rescue Ice::OperationNotExistException + # + # This operation is not supported in Java. + # + rescue + print $!.backtrace.join("\n") + test(false) end puts "ok" |