Commit 11ffb938 authored by Tomoyuki Sahara's avatar Tomoyuki Sahara

assert_nothing_raised is not available on mruby 1.0.0.

parent ca495944
##
# IO Test
unless Object.respond_to? :assert_nothing_raised
def assert_nothing_raised(*exp)
ret = true
if $mrbtest_assert
$mrbtest_assert_idx += 1
msg = exp.last.class == String ? exp.pop : ""
begin
yield
rescue Exception => e
msg = "#{msg} exception raised."
diff = " Class: <#{e.class}>\n" +
" Message: #{e.message}"
$mrbtest_assert.push([$mrbtest_assert_idx, msg, diff])
ret = false
end
end
ret
end
end
assert('IO TEST SETUP') do
MRubyIOTestUtil.io_test_setup
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