about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2012-12-13 00:02:50 +0000
committerEric Wong <normalperson@yhbt.net>2012-12-13 00:09:53 +0000
commit7a3fc55424338ad458cc719d4cb3c4e28802d5cb (patch)
treee2d30f94072e448c6b71736b97a5cb2f99b9afe3 /test
parent48fc432a3b9dfd2b0435f0975556d4a321a5239b (diff)
downloadkgio-7a3fc55424338ad458cc719d4cb3c4e28802d5cb.tar.gz
This allows us to create an unconnected socket, just like
the normal Socket class it inherits from.
Diffstat (limited to 'test')
-rw-r--r--test/test_socket.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/test_socket.rb b/test/test_socket.rb
new file mode 100644
index 0000000..a85f0cc
--- /dev/null
+++ b/test/test_socket.rb
@@ -0,0 +1,14 @@
+require 'test/unit'
+require 'kgio'
+
+class TestKgioSocket < Test::Unit::TestCase
+  def test_socket_args
+    s = Kgio::Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0)
+    assert_kind_of Socket, s
+    assert_instance_of Kgio::Socket, s
+
+    s = Kgio::Socket.new(Socket::AF_UNIX, Socket::SOCK_STREAM, 0)
+    assert_kind_of Socket, s
+    assert_instance_of Kgio::Socket, s
+  end
+end