about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2010-10-07 20:00:09 -0700
committerEric Wong <e@yhbt.net>2010-10-07 20:00:09 -0700
commitf5fc35221d37141b0f72278c7b969211410e94c0 (patch)
tree559e1d0d936a9a88de77818270d897f6c5806362
parent2152188f41bf2a5067e84a4404b48b2282a9dd55 (diff)
downloadkgio-f5fc35221d37141b0f72278c7b969211410e94c0.tar.gz
case/when and === didn't actually work as I expected
them to.
-rw-r--r--test/lib_read_write.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/lib_read_write.rb b/test/lib_read_write.rb
index e147566..6296586 100644
--- a/test/lib_read_write.rb
+++ b/test/lib_read_write.rb
@@ -83,6 +83,8 @@ module LibReadWriteTest
         case rv
         when String
           wr = rv
+        when Kgio::WaitReadable
+          assert false, "should never get here line=#{__LINE__}"
         when Kgio::WaitWritable
           IO.select(nil, [ @wr ])
         else
@@ -144,6 +146,8 @@ module LibReadWriteTest
   def test_trywrite_return_wait_writable
     tmp = []
     tmp << @wr.kgio_trywrite("HI") until tmp[-1] == Kgio::WaitWritable
+    assert Kgio::WaitWritable === tmp[-1]
+    assert(!(Kgio::WaitReadable === tmp[-1]))
     assert_equal Kgio::WaitWritable, tmp.pop
     assert tmp.size > 0
     penultimate = tmp.pop