summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-06 00:48:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-06 00:48:28 +0000
commit122de73a19cb5f08c56589748ebc98055fc964df (patch)
tree9fc1fccabb315bacfd9dadb982b33c84c85853af /test
parent928d1a5261fc3afcfcdfb267b6b5f0323b81a669 (diff)
test_objspace.rb: refine
* test/objspace/test_objspace.rb (test_reachable_objects_from): use proper assertions, and show messages than comments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/objspace/test_objspace.rb8
1 files changed, 3 insertions, 5 deletions
diff --git a/test/objspace/test_objspace.rb b/test/objspace/test_objspace.rb
index a18923137e..723e6e431e 100644
--- a/test/objspace/test_objspace.rb
+++ b/test/objspace/test_objspace.rb
@@ -85,13 +85,11 @@ class TestObjSpace < Test::Unit::TestCase
max = [refs.size, max].max
unless refs.nil?
- refs.each{|ro|
- # check this referenced object is not internal object
- assert_equal(false, ro.nil?)
+ refs.each_with_index {|ro, i|
+ assert_not_nil(ro, "#{i}: this referenced object is internal object")
}
end
}
- STDERR.puts max
- assert_equal(true, max >= 1_001) # 1000 elems + Array class
+ assert_operator(max, :>=, 1_001, "1000 elems + Array class")
end
end