[svn:parrot] r49497 - trunk/t/pmc

dukeleto at svn.parrot.org dukeleto at svn.parrot.org
Sun Oct 10 17:48:06 UTC 2010


Author: dukeleto
Date: Sun Oct 10 17:48:06 2010
New Revision: 49497
URL: https://trac.parrot.org/parrot/changeset/49497

Log:
[t] Add tests for creating IPv6 sockets

Modified:
   trunk/t/pmc/socket.t

Modified: trunk/t/pmc/socket.t
==============================================================================
--- trunk/t/pmc/socket.t	Sun Oct 10 17:42:12 2010	(r49496)
+++ trunk/t/pmc/socket.t	Sun Oct 10 17:48:06 2010	(r49497)
@@ -20,16 +20,20 @@
 .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
 
@@ -73,6 +77,36 @@
     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'


More information about the parrot-commits mailing list