diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-03-12 12:56:15 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-03-12 20:56:50 +0000 |
commit | c478549ea7490de2432ed31ffee37a2bfc1d24f3 (patch) | |
tree | c4998b538dbfe13840bb527952e689c6d213d5c7 /test/test_inet_diag_socket.rb | |
parent | a4b9c8334e2bc0698f0650d275be0935e86dc13e (diff) | |
download | raindrops-c478549ea7490de2432ed31ffee37a2bfc1d24f3.tar.gz |
No need to waste resources on creating/destroying a socket.
Diffstat (limited to 'test/test_inet_diag_socket.rb')
-rw-r--r-- | test/test_inet_diag_socket.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_inet_diag_socket.rb b/test/test_inet_diag_socket.rb new file mode 100644 index 0000000..c40d50e --- /dev/null +++ b/test/test_inet_diag_socket.rb @@ -0,0 +1,13 @@ +# -*- encoding: binary -*- +require 'test/unit' +require 'raindrops' +$stderr.sync = $stdout.sync = true + +class TestInetDiagSocket < Test::Unit::TestCase + def test_new + sock = Raindrops::InetDiagSocket.new + assert_kind_of Socket, sock + assert_kind_of Fixnum, sock.fileno + assert_nil sock.close + end +end if RUBY_PLATFORM =~ /linux/ |