aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-18 00:01:08 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-18 00:01:08 +0000
commit2648a803c12a9885712cdd0419a2edd35df54e2b (patch)
tree5ba6ca83d52ca3b9771920bbbe6e904986ad8bc4
parent5760abaf088c514e9fdd3108a0cb13419e8a7642 (diff)
downloadruby-2648a803c12a9885712cdd0419a2edd35df54e2b.tar.gz
* 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
-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