diff options
author | Eric Wong <normalperson@yhbt.net> | 2012-12-13 00:02:50 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2012-12-13 00:09:53 +0000 |
commit | 7a3fc55424338ad458cc719d4cb3c4e28802d5cb (patch) | |
tree | e2d30f94072e448c6b71736b97a5cb2f99b9afe3 /test | |
parent | 48fc432a3b9dfd2b0435f0975556d4a321a5239b (diff) | |
download | kgio-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.rb | 14 |
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 |