[t] Convert an exception test to PIR
[parrot.git] / t / pmc / sockaddr.t
blobac7b40d74d64042fd7ad1b9d108ccdc4e9635eab
1 #! parrot
2 # Copyright (C) 2006-2008, Parrot Foundation.
3 # $Id$
5 =head1 NAME
7 t/pmc/sockaddr.t - test the Sockaddr PMC
9 =head1 SYNOPSIS
11     % prove t/pmc/sockaddr.t
13 =head1 DESCRIPTION
15 Test the Sockaddr PMC.
17 =cut
19 .sub main :main
20     .include 'test_more.pir'
22     plan(4)
24     new $P0, ['Socket']
25     ok(1, 'Instantiated a Socket PMC')
27     $P1 = $P0."sockaddr"("localhost", 1234)
28     ok(1, 'socket.sockaddr method successful')
30     $I0 = isnull $P0
31     $I0 = not $I0
32     ok($I0, 'Sockaddr PMC created')
33     $S0 = typeof $P1
34     is($S0, 'Sockaddr', 'PMC has correct type')
35 .end
37 # Local Variables:
38 #   mode: pir
39 #   fill-column: 100
40 # End:
41 # vim: expandtab shiftwidth=4 ft=pir: