Last change
on this file since 322 was 321, checked in by coas-nagasima, 7 years ago |
文字コードを設定
|
-
Property svn:eol-style
set to
native
-
Property svn:mime-type
set to
text/x-ruby;charset=UTF-8
|
File size:
593 bytes
|
Line | |
---|
1 | ##
|
---|
2 | # NameError ISO Test
|
---|
3 |
|
---|
4 | assert('NameError', '15.2.31') do
|
---|
5 | assert_equal Class, NameError.class
|
---|
6 | end
|
---|
7 |
|
---|
8 | assert('NameError#name', '15.2.31.2.1') do
|
---|
9 |
|
---|
10 | # This check is not duplicate with 15.2.31.2.2 check.
|
---|
11 | # Because the NameError in this test is generated in
|
---|
12 | # C API.
|
---|
13 | class TestDummy
|
---|
14 | alias foo bar
|
---|
15 | rescue NameError => e
|
---|
16 | $test_dummy_result = e.name
|
---|
17 | end
|
---|
18 |
|
---|
19 | assert_equal :bar, $test_dummy_result
|
---|
20 | end
|
---|
21 |
|
---|
22 | assert('NameError#initialize', '15.2.31.2.2') do
|
---|
23 | e = NameError.new('a', :foo)
|
---|
24 |
|
---|
25 | assert_equal NameError, e.class
|
---|
26 | assert_equal 'a', e.message
|
---|
27 | assert_equal :foo, e.name
|
---|
28 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.