diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_m17n.rb | 14 | ||||
| -rw-r--r-- | test/stringio/test_stringio.rb | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index 0251315fcf..c1184c551f 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -1526,13 +1526,13 @@ class TestM17N < Test::Unit::TestCase def test_setbyte_range s = u("\xE3\x81\x82\xE3\x81\x84") - assert_raise(RangeError) { s.setbyte(0, -1) } - assert_nothing_raised { s.setbyte(0, 0x00) } - assert_nothing_raised { s.setbyte(0, 0x7F) } - assert_nothing_raised { s.setbyte(0, 0x80) } - assert_nothing_raised { s.setbyte(0, 0xff) } - assert_raise(RangeError) { s.setbyte(0, 0x100) } - assert_raise(RangeError) { s.setbyte(0, 0x4f7574206f6620636861722072616e6765) } + assert_nothing_raised { s.setbyte(0, -1) } + assert_nothing_raised { s.setbyte(0, 0x00) } + assert_nothing_raised { s.setbyte(0, 0x7F) } + assert_nothing_raised { s.setbyte(0, 0x80) } + assert_nothing_raised { s.setbyte(0, 0xff) } + assert_nothing_raised { s.setbyte(0, 0x100) } + assert_nothing_raised { s.setbyte(0, 0x4f7574206f6620636861722072616e6765) } end def test_compatible diff --git a/test/stringio/test_stringio.rb b/test/stringio/test_stringio.rb index b508d56310..6d1a6ea8d5 100644 --- a/test/stringio/test_stringio.rb +++ b/test/stringio/test_stringio.rb @@ -453,9 +453,9 @@ class TestStringIO < Test::Unit::TestCase assert_equal(0, t.pos) assert_equal("\u{30eb 30d3 30fc}\u7d05\u7389bar\n", s) - assert_raise(RangeError) {t.ungetbyte(-1)} - assert_raise(RangeError) {t.ungetbyte(256)} - assert_raise(RangeError) {t.ungetbyte(1<<64)} + assert_nothing_raised {t.ungetbyte(-1)} + assert_nothing_raised {t.ungetbyte(256)} + assert_nothing_raised {t.ungetbyte(1<<64)} end def test_ungetc |
