mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
add test case for 750b7c2
This commit is contained in:
+19
-1
@@ -30,7 +30,7 @@ end
|
||||
|
||||
assert('Exception#to_s', '15.2.22.5.3') do
|
||||
e = Exception.exception('a')
|
||||
|
||||
|
||||
e.to_s == 'a'
|
||||
end
|
||||
|
||||
@@ -269,6 +269,24 @@ assert('Exception 14') do
|
||||
a == :ok
|
||||
end
|
||||
|
||||
assert('Exception 15') do
|
||||
a = begin
|
||||
:ok
|
||||
rescue
|
||||
:ng
|
||||
end
|
||||
a == :ok
|
||||
end
|
||||
|
||||
assert('Exception 16') do
|
||||
begin
|
||||
raise "foo"
|
||||
false
|
||||
rescue => e
|
||||
e.message == "foo"
|
||||
end
|
||||
end
|
||||
|
||||
assert('Exception#inspect without message') do
|
||||
Exception.new.inspect
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user