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

dukeleto at svn.parrot.org dukeleto at svn.parrot.org
Sun Oct 10 17:05:27 UTC 2010


Author: dukeleto
Date: Sun Oct 10 17:05:27 2010
New Revision: 49494
URL: https://trac.parrot.org/parrot/changeset/49494

Log:
[t] Add some tests for closing Sockets

Modified:
   trunk/t/pmc/socket.t

Modified: trunk/t/pmc/socket.t
==============================================================================
--- trunk/t/pmc/socket.t	Sun Oct 10 15:15:41 2010	(r49493)
+++ trunk/t/pmc/socket.t	Sun Oct 10 17:05:27 2010	(r49494)
@@ -1,5 +1,5 @@
 #!./parrot
-# Copyright (C) 2006-2009, Parrot Foundation.
+# Copyright (C) 2006-2010, Parrot Foundation.
 # $Id$
 
 =head1 NAME
@@ -20,11 +20,12 @@
 .sub main :main
     .include 'test_more.pir'
 
-    plan(7)
+    plan(9)
 
     test_init()
     test_clone()
     test_bool()
+    test_close()
     test_tcp_socket()
     test_udp_socket()
 
@@ -43,6 +44,13 @@
     ok($P0, 'get_bool on Socket')
 .end
 
+.sub test_close
+    new $P0, ['Socket']
+    $P0.'close'()
+    ok(1, 'Closed a Socket')
+    nok($P0,'A closed Socket returns False')
+.end
+
 .sub test_clone
     new $P0, ['Socket']
     $P1 = $P0."sockaddr"("localhost", 1234)


More information about the parrot-commits mailing list