[前][次][番号順一覧][スレッド一覧]

ruby-changes:31130

From: nobu <ko1@a...>
Date: Wed, 9 Oct 2013 17:39:34 +0900 (JST)
Subject: [ruby-changes:31130] nobu:r43209 (trunk): test_tracepoint.rb: include zombies

nobu	2013-10-09 17:39:28 +0900 (Wed, 09 Oct 2013)

  New Revision: 43209

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43209

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

  Modified files:
    trunk/test/-ext-/tracepoint/test_tracepoint.rb
Index: test/-ext-/tracepoint/test_tracepoint.rb
===================================================================
--- test/-ext-/tracepoint/test_tracepoint.rb	(revision 43208)
+++ test/-ext-/tracepoint/test_tracepoint.rb	(revision 43209)
@@ -22,7 +22,9 @@ class TestTracepointObj < Test::Unit::Te https://github.com/ruby/ruby/blob/trunk/test/-ext-/tracepoint/test_tracepoint.rb#L22
     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::Te https://github.com/ruby/ruby/blob/trunk/test/-ext-/tracepoint/test_tracepoint.rb#L42
     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]