Skip to content

Commit

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

plan(9)
plan(11)

test_init()
test_clone()
test_bool()
test_close()
test_tcp_socket()
test_raw_tcp_socket()
test_udp_socket()
test_raw_udp_socket()

.end

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

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

.sub test_udp_socket
.local pmc sock
sock = new 'Socket'
Expand All @@ -79,6 +88,14 @@ Tests the Socket PMC.
ok(sock, 'Created a UDP Socket')
.end

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

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

# Local Variables:
# mode: pir
# fill-column: 100
Expand Down

0 comments on commit 5ec1ea6

Please sign in to comment.