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

ruby-changes:34352

From: nobu <ko1@a...>
Date: Sun, 15 Jun 2014 07:11:37 +0900 (JST)
Subject: [ruby-changes:34352] nobu:r46433 (trunk): runner.rb: check increment

nobu	2014-06-15 07:11:22 +0900 (Sun, 15 Jun 2014)

  New Revision: 46433

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

  Log:
    runner.rb: check increment
    
    * test/runner.rb (after_teardown): check increment of active trace
      events.

  Modified files:
    trunk/test/runner.rb
Index: test/runner.rb
===================================================================
--- test/runner.rb	(revision 46432)
+++ test/runner.rb	(revision 46433)
@@ -24,8 +24,10 @@ module Test::Unit https://github.com/ruby/ruby/blob/trunk/test/runner.rb#L24
       assert_empty(Process.waitall)
 
       # detect zombie traces.
+      zombie_traces = Hash.new(0)
       TracePoint.stat.each{|key, (activated, deleted)|
-        assert_equal(0, activated, "The number of active trace events (#{key}) should be zero.")
+        old, zombie_traces[key] = zombie_traces[key], activated
+        assert_equal(old, activated, "The number of active trace events (#{key}) should not increase.")
         # puts "TracePoint - deleted: #{deleted}" if deleted > 0
       }
     end

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

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