mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add test for NameError#name
This commit is contained in:
+13
-1
@@ -9,7 +9,19 @@ assert('NameError superclass', '15.2.31.2') do
|
||||
NameError.superclass == StandardError
|
||||
end
|
||||
|
||||
# TODO 15.2.31.2.1 NameError#name
|
||||
assert('NameError#name', '15.2.31.2.1') do
|
||||
|
||||
# This check is not duplicate with 15.2.31.2.2 check.
|
||||
# Because the NameError in this test is generated in
|
||||
# C API.
|
||||
class TestDummy
|
||||
alias foo bar
|
||||
rescue NameError => e
|
||||
$test_dummy_result = e.name
|
||||
end
|
||||
|
||||
$test_dummy_result == :bar
|
||||
end
|
||||
|
||||
assert('NameError#initialize', '15.2.31.2.2') do
|
||||
e = NameError.new.initialize('a')
|
||||
|
||||
Reference in New Issue
Block a user