test/test.rb in rjb-1.5.1 vs test/test.rb in rjb-1.5.2

- old
+ new

@@ -800,17 +800,16 @@ raise end end def test_reraise_exception() - unless /^1\.8/ =~ RUBY_VERSION - begin - cause_exception - rescue - assert($!.to_s =~ /NumberFormatException/) - end - end + skip('1.8 does not support reraise') if /^1\.8/ =~ RUBY_VERSION + begin + cause_exception + rescue + assert($!.inspect =~ /NumberFormatException/) + end end def test_inner_exception test = import('jp.co.infoseek.hp.arton.rjb.Test').new @@ -872,14 +871,15 @@ assert_equal(cons._classname, sys._invoke('console', '')._classname) assert_equal(cons._classname, sys._invoke('console', nil)._classname) assert_equal(cons._classname, sys._invoke('console')._classname) end def test_longarg + skip('rbx can handle 64bits long') if RUBY_ENGINE == 'rbx' assert_equal(597899502607411822, @jLong.reverse(0x7654321076543210)) begin @jLong.reverse(0x76543210765432101) - fail 'no exception for gibnum it doesn\'t convert Java long' + fail 'no exception for bigbnum it doesn\'t convert Java long' rescue RangeError assert true end end def test_bytearg @@ -905,10 +905,10 @@ encoding = sys.property('file.encoding') s = @jString.new("\x8a\xbf\x8e\x9a\x83\x65\x83\x4c\x83\x58\x83\x67".force_encoding Encoding::SHIFT_JIS) e = @jString.new("\xb4\xc1\xbb\xfa\xa5\xc6\xa5\xad\xa5\xb9\xa5\xc8".force_encoding Encoding::EUC_JP) u = @jString.new("\xE6\xBC\xA2\xE5\xAD\x97\xE3\x83\x86\xE3\x82\xAD\xE3\x82\xB9\xE3\x83\x88".force_encoding Encoding::UTF_8) if encoding == 'MS932' - s1 = @jString.new_with_sig('[B', "\x8a\xbf\x8e\x9a\x83\x65\x83\x4c\x83\x58\x83\x67".bytes) + s1 = @jString.new("\x8a\xbf\x8e\x9a\x83\x65\x83\x4c\x83\x58\x83\x67".bytes) elsif encoding.upcase == 'EUC-JP' s1 = @jString.new("\xb4\xc1\xbb\xfa\xa5\xc6\xa5\xad\xa5\xb9\xa5\xc8".bytes) elsif encoding.upcase == 'UTF-8' s1 = @jString.new("\xE6\xBC\xA2\xE5\xAD\x97\xE3\x83\x86\xE3\x82\xAD\xE3\x82\xB9\xE3\x83\x88".bytes) else