aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--test/ruby/test_gc.rb5
2 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index c1e51c1b11..a5e580c534 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/test/ruby/test_gc.rb b/test/ruby/test_gc.rb
index 1a7b38dbea..800fa346c2 100644
--- a/test/ruby/test_gc.rb
+++ b/test/ruby/test_gc.rb
@@ -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