diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-13 05:12:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-03-13 05:12:43 +0000 |
commit | 734fa238408375feb9f3e63c34f0d30618974f81 (patch) | |
tree | 9e7cf32200802be9234022699b95d9d82ca55f16 /test/objspace/test_objspace.rb | |
parent | 5fdf36734886d933315b837173314f465ba25f46 (diff) | |
download | ruby-734fa238408375feb9f3e63c34f0d30618974f81.tar.gz |
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
Diffstat (limited to 'test/objspace/test_objspace.rb')
-rw-r--r-- | test/objspace/test_objspace.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb index 66a8a1683b..b948c82038 100644 --- a/test/objspace/test_objspace.rb +++ b/test/objspace/test_objspace.rb @@ -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 |