1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_gc.rb: relax criterion

* test/ruby/test_gc.rb (TestGc#test_expand_heap): relax the
  criterion and compare by epsilon.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2017-09-24 09:44:26 +00:00
parent cf24b38197
commit 6aaa2ca5c5

View file

@ -290,7 +290,7 @@ class TestGc < Test::Unit::TestCase
base_length = GC.stat[:heap_eden_pages] base_length = GC.stat[:heap_eden_pages]
(base_length * 500).times{ 'a' } (base_length * 500).times{ 'a' }
GC.start GC.start
assert_in_delta base_length, (v = GC.stat[:heap_eden_pages]), 2, assert_in_epsilon base_length, (v = GC.stat[:heap_eden_pages]), 1/8r,
"invalid heap expanding (base_length: #{base_length}, GC.stat[:heap_eden_pages]: #{v})" "invalid heap expanding (base_length: #{base_length}, GC.stat[:heap_eden_pages]: #{v})"
a = [] a = []