diff options
| author | Daniel Bovensiepen <[email protected]> | 2012-05-29 01:20:46 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2012-05-29 01:20:46 +0800 |
| commit | 31e9705022d585d818a5c869f0f91e4d6b7c252e (patch) | |
| tree | 1f9abea740912054841872ff585778cd6d4abaa5 /test/t/argumenterror.rb | |
| parent | ec3944d9c05fc5553469375661dbdaba42a57303 (diff) | |
| download | mruby-31e9705022d585d818a5c869f0f91e4d6b7c252e.tar.gz mruby-31e9705022d585d818a5c869f0f91e4d6b7c252e.zip | |
Add Test cases for Literals, Enumeration, Exceptions and clean line endings
Diffstat (limited to 'test/t/argumenterror.rb')
| -rw-r--r-- | test/t/argumenterror.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/test/t/argumenterror.rb b/test/t/argumenterror.rb index be1dec974..ca998f8de 100644 --- a/test/t/argumenterror.rb +++ b/test/t/argumenterror.rb @@ -2,6 +2,14 @@ # ArgumentError ISO Test assert('ArgumentError', '15.2.24') do - ArgumentError.class == Class -end + e2 = nil + a = [] + begin + # this will cause an exception due to the wrong arguments + a[] + rescue => e1 + e2 = e1 + end + ArgumentError.class == Class and e2.class == ArgumentError +end |
