Commit faee6987 authored by yui-knk's avatar yui-knk

Refactoring test to use assert_nothing_raised.

parent 64b30b65
...@@ -345,13 +345,13 @@ assert('Exception#inspect without message') do ...@@ -345,13 +345,13 @@ assert('Exception#inspect without message') do
end end
assert('Exception#backtrace') do assert('Exception#backtrace') do
begin assert_nothing_raised do
raise "get backtrace" begin
rescue => e raise "get backtrace"
e.backtrace rescue => e
e.backtrace
end
end end
true
end end
assert('Raise in ensure') do assert('Raise in ensure') do
......
...@@ -476,7 +476,11 @@ assert('String#upcase!', '15.2.10.5.43') do ...@@ -476,7 +476,11 @@ assert('String#upcase!', '15.2.10.5.43') do
end end
assert('String#inspect', '15.2.10.5.46') do assert('String#inspect', '15.2.10.5.46') do
("\1" * 100).inspect # should not raise an exception - regress #1210 # should not raise an exception - regress #1210
assert_nothing_raised do
("\1" * 100).inspect
end
assert_equal "\"\\000\"", "\0".inspect assert_equal "\"\\000\"", "\0".inspect
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment