2 # Copyright (C) 2006-2007, Parrot Foundation.
7 use lib qw( . lib ../lib ../../lib );
9 use Parrot::Test tests => 2;
13 t/dynpmc/pmethod_test.t - test the PCCMETHOD_Test PMC
18 % prove t/dynpmc/pccmethod_test.t
22 Tests the PCCMETHOD_Test PMC.
26 pir_output_is( <<'CODE', <<'OUT', 'named args' );
28 $P0 = loadlib 'pccmethod_test'
29 $P1 = new 'PCCMETHOD_Test'
30 $P1.'test_method3'( 'a1name' => 10, 'a2name' => 20 )
37 pir_output_is( <<'CODE', <<'OUT', 'optional args and multiple returns' );
39 $P0 = loadlib 'pccmethod_test'
40 $P1 = new 'PCCMETHOD_Test'
42 $P1.'test_method1'(1, 2, 3, 4, 5, 6)
45 $P1.'test_method2'(1,2)
46 $P1.'test_method2'(1,2,3)
47 ($P2,$P3) = $P1.'test_method2'(101)
60 0, 0, ResizablePMCArray [ ]
62 1, 1, ResizablePMCArray [ ]
64 1, 1, ResizablePMCArray [ 2 ]
66 1, 1, ResizablePMCArray [ 2, 3 ]
68 101, 1, ResizablePMCArray [ ]
74 # cperl-indent-level: 4
77 # vim: expandtab shiftwidth=4: