File: test_socket.rb

package info (click to toggle)
ruby-kgio 2.11.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 504 kB
  • sloc: ruby: 2,779; ansic: 2,017; sh: 32; makefile: 5
file content (14 lines) | stat: -rw-r--r-- 382 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
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