Skip to content

Commit

Permalink
[t] Add test to Socket is_closed()
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandobrito committed Dec 1, 2010
1 parent e4b8819 commit 2a3c7f8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion t/pmc/socket.t
Expand Up @@ -19,7 +19,7 @@ Tests the Socket PMC.
.sub main :main
.include 'test_more.pir'

plan(18)
plan(19)

test_init()
test_get_fd()
Expand All @@ -28,6 +28,7 @@ Tests the Socket PMC.
test_clone()
test_bool()
test_close()
test_is_closed()
test_tcp_socket()
test_tcp_socket6()
test_raw_tcp_socket()
Expand Down Expand Up @@ -80,6 +81,13 @@ CODE
nok($P0,'A closed Socket returns False')
.end

.sub test_is_closed
new $P0, ['Socket']

$N0 = $P0.'is_closed'()
is($N0, 1, 'Socket is_closed returned 1 to new socket')
.end

.sub test_clone
new $P0, ['Socket']
$P1 = $P0."sockaddr"("localhost", 1234)
Expand Down

0 comments on commit 2a3c7f8

Please sign in to comment.