mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_hash.rb: add assertions
* test/ruby/test_hash.rb (test_wrapper_of_special_const): test other special obejcts. [Bug #9381] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ca6e62229
commit
4de35bafbc
1 changed files with 7 additions and 2 deletions
|
@ -1279,8 +1279,13 @@ class TestHash < Test::Unit::TestCase
|
|||
end
|
||||
end
|
||||
|
||||
hash = {5 => bug9381}
|
||||
assert_equal(bug9381, hash[wrapper.new(5)])
|
||||
bad = [
|
||||
5, true, false, nil,
|
||||
].select do |x|
|
||||
hash = {x => bug9381}
|
||||
hash[wrapper.new(x)] != bug9381
|
||||
end
|
||||
assert_empty(bad, bug9381)
|
||||
end
|
||||
|
||||
def test_label_syntax
|
||||
|
|
Loading…
Reference in a new issue