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

* test/ruby/test_gc.rb: catch up last fix.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ko1 2014-09-10 01:48:23 +00:00
parent 6c6254274f
commit 83f02b98b1
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,7 @@
Wed Sep 10 10:48:04 2014 Koichi Sasada <ko1@atdot.net>
* test/ruby/test_gc.rb: catch up last fix.
Wed Sep 10 10:36:08 2014 Koichi Sasada <ko1@atdot.net>
* gc.c (objspace_total_slot): rename objspace_available_slots.

View file

@ -91,14 +91,14 @@ class TestGc < Test::Unit::TestCase
GC.start
GC.stat(stat)
ObjectSpace.count_objects(count)
assert_equal(count[:TOTAL]-count[:FREE], stat[:heap_live_slot])
assert_equal(count[:FREE], stat[:heap_free_slot])
assert_equal(count[:TOTAL]-count[:FREE], stat[:heap_live_slots])
assert_equal(count[:FREE], stat[:heap_free_slots])
# measure again without GC.start
1000.times{ "a" + "b" }
GC.stat(stat)
ObjectSpace.count_objects(count)
assert_equal(count[:FREE], stat[:heap_free_slot])
assert_equal(count[:FREE], stat[:heap_free_slots])
end
def test_stat_argument
@ -113,7 +113,7 @@ class TestGc < Test::Unit::TestCase
def test_latest_gc_info
GC.start
count = GC.stat(:heap_free_slot) + GC.stat(:heap_allocatable_pages) * GC::INTERNAL_CONSTANTS[:HEAP_OBJ_LIMIT]
count = GC.stat(:heap_free_slots) + GC.stat(:heap_allocatable_pages) * GC::INTERNAL_CONSTANTS[:HEAP_OBJ_LIMIT]
count.times{ "a" + "b" }
assert_equal :newobj, GC.latest_gc_info[:gc_by]