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

ruby-changes:33398

From: nobu <ko1@a...>
Date: Mon, 31 Mar 2014 06:00:57 +0900 (JST)
Subject: [ruby-changes:33398] nobu:r45477 (trunk): test_process.rb: test if success?

nobu	2014-03-31 06:00:51 +0900 (Mon, 31 Mar 2014)

  New Revision: 45477

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

  Log:
    test_process.rb: test if success?
    
    * test/ruby/test_process.rb (test_rlimit_value): should not use
      magic number 0, which may not be EXIT_SUCCESS.  use `success?`
      instead.

  Modified files:
    trunk/test/ruby/test_process.rb
Index: test/ruby/test_process.rb
===================================================================
--- test/ruby/test_process.rb	(revision 45476)
+++ test/ruby/test_process.rb	(revision 45477)
@@ -131,7 +131,7 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L131
           exit false
         end
       End
-      assert_not_equal(0, s.exitstatus)
+      assert_not_predicate(s, :success?)
       s = run_in_child(<<-'End')
         cur, max = Process.getrlimit(:NOFILE)
         Process.setrlimit(:NOFILE, [max-10, cur].min)
@@ -141,7 +141,7 @@ class TestProcess < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_process.rb#L141
           exit false
         end
       End
-      assert_not_equal(0, s.exitstatus)
+      assert_not_predicate(s, :success?)
     end
   end
 

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

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