mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_objspace.rb: better assertions
* test/objspace/test_objspace.rb: use assertions for better failure messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5fdf367348
commit
734fa23840
1 changed files with 6 additions and 6 deletions
|
@ -54,16 +54,16 @@ class TestObjSpace < Test::Unit::TestCase
|
|||
|
||||
def test_count_objects_size
|
||||
res = ObjectSpace.count_objects_size
|
||||
assert_equal(false, res.empty?)
|
||||
assert_equal(true, res[:TOTAL] > 0)
|
||||
assert_not_empty(res)
|
||||
assert_operator(res[:TOTAL], :>, 0)
|
||||
arg = {}
|
||||
ObjectSpace.count_objects_size(arg)
|
||||
assert_equal(false, arg.empty?)
|
||||
assert_not_empty(arg)
|
||||
end
|
||||
|
||||
def test_count_nodes
|
||||
res = ObjectSpace.count_nodes
|
||||
assert_equal(false, res.empty?)
|
||||
assert_not_empty(res)
|
||||
arg = {}
|
||||
ObjectSpace.count_nodes(arg)
|
||||
assert_not_empty(arg)
|
||||
|
@ -73,10 +73,10 @@ class TestObjSpace < Test::Unit::TestCase
|
|||
|
||||
def test_count_tdata_objects
|
||||
res = ObjectSpace.count_tdata_objects
|
||||
assert_equal(false, res.empty?)
|
||||
assert_not_empty(res)
|
||||
arg = {}
|
||||
ObjectSpace.count_tdata_objects(arg)
|
||||
assert_equal(false, arg.empty?)
|
||||
assert_not_empty(arg)
|
||||
end
|
||||
|
||||
def test_reachable_objects_from
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue