diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-17 23:56:37 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-09-17 23:56:37 +0000 |
commit | 05561ad75c4e3e7b1cb2615f51683aa8478e7540 (patch) | |
tree | f82f09b2949c458a47c05d889b3ca68dde200dd1 /test/objspace | |
parent | df33c063fccf1bca9e7d67140b2950e1b434d9b4 (diff) |
ext/objspace/objspace.c: remove unneeded code clones.
`setup_hash` have already performed nil check and empty check.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/objspace')
-rw-r--r-- | test/objspace/test_objspace.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index c5c8147f5f..9c706f2736 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -61,9 +61,19 @@ class TestObjSpace < Test::Unit::TestCase res = ObjectSpace.count_objects_size assert_not_empty(res) assert_operator(res[:TOTAL], :>, 0) + end + + def test_count_objects_size_with_hash arg = {} ObjectSpace.count_objects_size(arg) assert_not_empty(arg) + arg = {:TOTAL => 1 } + ObjectSpace.count_objects_size(arg) + assert_not_empty(arg) + end + + def test_count_objects_size_with_wrong_type + assert_raise(TypeError) { ObjectSpace.count_objects_size(0) } end def test_count_nodes |