Commit c302b86f authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #2220 from yui-knk/refactor-test

Refactoring test to use assert_nothing_raised.
parents 48ac1f74 faee6987
...@@ -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
assert_nothing_raised do
begin begin
raise "get backtrace" raise "get backtrace"
rescue => e rescue => e
e.backtrace 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