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

ruby-changes:38836

From: nobu <ko1@a...>
Date: Tue, 16 Jun 2015 18:29:35 +0900 (JST)
Subject: [ruby-changes:38836] nobu:r50917 (trunk): test_nonblock.rb: use assert_predicate

nobu	2015-06-16 18:29:17 +0900 (Tue, 16 Jun 2015)

  New Revision: 50917

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

  Log:
    test_nonblock.rb: use assert_predicate
    
    * test/socket/test_nonblock.rb (test_recv_nonblock_no_exception),
      (test_recvfrom_nonblock_no_exception): use assert_predicate for
      failure messages.

  Modified files:
    trunk/test/socket/test_nonblock.rb
Index: test/socket/test_nonblock.rb
===================================================================
--- test/socket/test_nonblock.rb	(revision 50916)
+++ test/socket/test_nonblock.rb	(revision 50917)
@@ -290,7 +290,7 @@ class TestSocketNonblock < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/socket/test_nonblock.rb#L290
     udp_pair do |s1, s2|
       assert_equal :wait_readable, s1.recvfrom_nonblock(100, exception: false)
       s2.send("aaa", 0)
-      assert s1.wait_readable
+      assert_predicate s1, :wait_readable
       mesg, inet_addr = s1.recvfrom_nonblock(100, exception: false)
       assert_equal(4, inet_addr.length)
       assert_equal("aaa", mesg)
@@ -358,7 +358,7 @@ class TestSocketNonblock < Test::Unit::T https://github.com/ruby/ruby/blob/trunk/test/socket/test_nonblock.rb#L358
     tcp_pair {|c, s|
       assert_equal :wait_readable, c.recv_nonblock(11, exception: false)
       s.write('HI')
-      assert c.wait_readable
+      assert_predicate c, :wait_readable
       assert_equal 'HI', c.recv_nonblock(11, exception: false)
       assert_equal :wait_readable, c.recv_nonblock(11, exception: false)
     }

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

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