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

ruby-changes:25329

From: naruse <ko1@a...>
Date: Mon, 29 Oct 2012 17:53:13 +0900 (JST)
Subject: [ruby-changes:25329] naruse:r37381 (trunk): Use assert_normal_exit to split process

naruse	2012-10-29 17:52:59 +0900 (Mon, 29 Oct 2012)

  New Revision: 37381

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

  Log:
    Use assert_normal_exit to split process

  Modified files:
    trunk/test/ruby/test_fiber.rb

Index: test/ruby/test_fiber.rb
===================================================================
--- test/ruby/test_fiber.rb	(revision 37380)
+++ test/ruby/test_fiber.rb	(revision 37381)
@@ -47,20 +47,21 @@
   end
 
   def test_many_fibers_with_threads
-    max = 1000
-    @cnt = 0
-    (1..100).map{|ti|
-      Thread.new{
-        max.times{|i|
-          Fiber.new{
-            @cnt += 1
-          }.resume
+    assert_normal_exit %q{
+      max = 1000
+      @cnt = 0
+      (1..100).map{|ti|
+        Thread.new{
+          max.times{|i|
+            Fiber.new{
+              @cnt += 1
+            }.resume
+          }
         }
+      }.each{|t|
+        t.join
       }
-    }.each{|t|
-      t.join
     }
-    assert_equal(:ok, :ok)
   end
 
   def test_error

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

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