* test/ruby/test_gc.rb (test_expand_heap): allow +/-1 diff.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5760abaf08
commit
2648a803c1
@ -1,3 +1,7 @@
|
||||
Wed Dec 18 09:00:17 2013 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* test/ruby/test_gc.rb (test_expand_heap): allow +/-1 diff.
|
||||
|
||||
Tue Dec 17 23:44:15 2013 Kazuki Tsujimoto <kazuki@callcc.net>
|
||||
|
||||
* test/ruby/test_io.rb: fix duplicated test name.
|
||||
|
@ -251,12 +251,13 @@ class TestGc < Test::Unit::TestCase
|
||||
base_length = GC.stat[:heap_eden_page_length]
|
||||
(base_length * 500).times{ 'a' }
|
||||
GC.start
|
||||
assert_equal base_length, GC.stat[:heap_eden_page_length], "invalid heap expanding"
|
||||
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}")
|
||||
|
||||
a = []
|
||||
(base_length * 500).times{ a << 'a'; nil }
|
||||
GC.start
|
||||
assert_operator base_length, :<, GC.stat[:heap_eden_page_length]
|
||||
assert_operator base_length, :<, GC.stat[:heap_eden_page_length] + 1
|
||||
eom
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user