diff options
| author | Daniel Bovensiepen <[email protected]> | 2012-05-19 23:18:42 +0800 |
|---|---|---|
| committer | Daniel Bovensiepen <[email protected]> | 2012-05-19 23:18:42 +0800 |
| commit | d45ecc3270990c4a2fd27706d0f6b1c8d5c4587e (patch) | |
| tree | 5b81dbeda3b6b69167ce8492f3dd770e821316ce /test/t/symbol.rb | |
| parent | d0a7b08303606431c0ca27ee1acaae0451e6223f (diff) | |
| download | mruby-d45ecc3270990c4a2fd27706d0f6b1c8d5c4587e.tar.gz mruby-d45ecc3270990c4a2fd27706d0f6b1c8d5c4587e.zip | |
Complete ISO test cases for Hash, Range, String and Symbol
Diffstat (limited to 'test/t/symbol.rb')
| -rw-r--r-- | test/t/symbol.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/t/symbol.rb b/test/t/symbol.rb new file mode 100644 index 000000000..325c8d990 --- /dev/null +++ b/test/t/symbol.rb @@ -0,0 +1,23 @@ +## +# Symbol ISO Test + +assert('Symbol', '15.2.11') do + Symbol.class == Class +end + +assert('Symbol#===', '15.2.11.3.1') do + :abc === :abc and not :abc === :cba +end + +assert('Symbol#id2name', '15.2.11.3.2') do + :abc.id2name == 'abc' +end + +assert('Symbol#to_s', '15.2.11.3.3') do + :abc.to_s == 'abc' +end + +assert('Symbol#to_sym', '15.2.11.3.4') do + :abc.to_sym == :abc +end + |
