6 class TestDefaultWait < Test::Unit::TestCase
9 a, b = Kgio::UNIXSocket.pair
10 assert_equal a, a.kgio_wait_writable
12 assert_equal b, b.kgio_wait_readable
17 assert_equal b, b.kgio_wait_writable
19 assert_equal a, a.kgio_wait_readable
22 def test_wait_readable_timed
25 assert_nil a.kgio_wait_readable(1.1)
27 assert_in_delta diff, 1.1, 0.2
30 assert_equal a, a.kgio_wait_readable(1.1)
33 def test_wait_writable_timed
36 true until Symbol === b.kgio_trywrite(buf)
38 assert_nil b.kgio_wait_writable(1.1)
40 assert_in_delta diff, 1.1, 0.2
43 assert_equal b, b.kgio_wait_writable(1.1)