mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
928d1a5261
commit
122de73a19
1 changed files with 3 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue