diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-18 04:36:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-18 04:36:43 +0000 |
commit | 4d5e15acc610d1e66f07eecd8c48498c02f7c06e (patch) | |
tree | b88ca6c24d24520e6b74f0e026954df865abaf5c /test | |
parent | 994702424264b23007606a48c5b490e68acf85cb (diff) | |
download | ruby-4d5e15acc610d1e66f07eecd8c48498c02f7c06e.tar.gz |
test_gc.rb: refine assertion
* test/ruby/test_gc.rb (test_expand_heap): use assert_in_delta
instead of bare assert.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_gc.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb index 800fa346c2..28d2dc9be1 100644 --- a/test/ruby/test_gc.rb +++ b/test/ruby/test_gc.rb @@ -251,8 +251,8 @@ class TestGc < Test::Unit::TestCase base_length = GC.stat[:heap_eden_page_length] (base_length * 500).times{ 'a' } GC.start - assert((base_length-1 .. base_length+1) === (v = GC.stat[:heap_eden_page_length]), - "invalid heap expanding (base_length: #{base_length}, GC.stat[:heap_eden_page_length]: #{v}") + assert_in_delta base_length, GC.stat[:heap_eden_page_length], 1, + "invalid heap expanding (base_length: #{base_length}, GC.stat[:heap_eden_page_length]: #{v})") a = [] (base_length * 500).times{ a << 'a'; nil } |