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

test_tracepoint.rb: include zombies

* test/-ext-/tracepoint/test_tracepoint.rb (test_tracks_objspace_count):
  free count should include zombies.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43209 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-10-09 08:39:28 +00:00
parent 90c1ebbfd5
commit b1b4724ea0

View file

@ -22,7 +22,9 @@ class TestTracepointObj < Test::Unit::TestCase
assert_equal 2, newobjs.size
assert_equal 'foobar', newobjs[0]
assert_equal Object, newobjs[1].class
end
def test_tracks_objspace_count
stat1 = {}
stat2 = {}
GC.disable
@ -40,7 +42,7 @@ class TestTracepointObj < Test::Unit::TestCase
assert_operator stat2[:total_allocated_object] - stat1[:total_allocated_object], :>=, newobj_count
assert_operator 1_000_000, :<=, newobj_count
assert_operator stat2[:total_freed_object] - stat1[:total_freed_object], :>=, free_count
assert_operator stat2[:total_freed_object] + stat2[:heap_final_num] - stat1[:total_freed_object], :>=, free_count
assert_operator stat2[:count] - stat1[:count], :==, gc_start_count
assert_operator gc_start_count, :>=, gc_end_count