diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-09 08:39:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-10-09 08:39:28 +0000 |
commit | b1b4724ea0c6e96e15d0f448b8185972e108238b (patch) | |
tree | cda8d1e015df20af1a3e312512f1b606c882e0f2 /test | |
parent | 90c1ebbfd578419e2c3e1251b7527483f8501bc2 (diff) | |
download | ruby-b1b4724ea0c6e96e15d0f448b8185972e108238b.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/-ext-/tracepoint/test_tracepoint.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/-ext-/tracepoint/test_tracepoint.rb b/test/-ext-/tracepoint/test_tracepoint.rb index 7d079779a8..a4cb2882ed 100644 --- a/test/-ext-/tracepoint/test_tracepoint.rb +++ b/test/-ext-/tracepoint/test_tracepoint.rb @@ -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 |