Skip to content

Commit

Permalink
[t] Add tests for creating IPv6 sockets
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@49497 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
leto committed Oct 10, 2010
1 parent 00f1f32 commit c66d320
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion t/pmc/socket.t
Expand Up @@ -20,16 +20,20 @@ Tests the Socket PMC.
.sub main :main
.include 'test_more.pir'

plan(11)
plan(15)

test_init()
test_clone()
test_bool()
test_close()
test_tcp_socket()
test_tcp_socket6()
test_raw_tcp_socket()
test_raw_tcp_socket6()
test_udp_socket()
test_udp_socket6()
test_raw_udp_socket()
test_raw_udp_socket6()

.end

Expand Down Expand Up @@ -73,6 +77,36 @@ Tests the Socket PMC.
ok(sock, 'Created a TCP Socket')
.end

.sub test_tcp_socket6
.local pmc sock
sock = new 'Socket'
sock.'socket'(.PIO_PF_INET6, .PIO_SOCK_STREAM, .PIO_PROTO_TCP)
ok(sock, 'Created a IPv6 TCP Socket')
.end

.sub test_raw_tcp_socket6
.local pmc sock
sock = new 'Socket'
sock.'socket'(.PIO_PF_INET6, .PIO_SOCK_RAW, .PIO_PROTO_TCP)
ok(sock, 'Created a raw IPv6 TCP Socket')
.end

.sub test_udp_socket6
.local pmc sock
sock = new 'Socket'

sock.'socket'(.PIO_PF_INET6, .PIO_SOCK_STREAM, .PIO_PROTO_UDP)
ok(sock, 'Created a IPv6 UDP Socket')
.end

.sub test_raw_udp_socket6
.local pmc sock
sock = new 'Socket'

sock.'socket'(.PIO_PF_INET6, .PIO_SOCK_RAW, .PIO_PROTO_UDP)
ok(sock, 'Created a raw IPv6 UDP Socket')
.end

.sub test_raw_tcp_socket
.local pmc sock
sock = new 'Socket'
Expand Down

0 comments on commit c66d320

Please sign in to comment.