fix codetest failure - ASSERT_ARGS does not have a ; after and
[parrot.git] / t / dynoplibs / pmc_pow.t
blobbdc6f80d2579517b7c3169a4294ac694579a32b2
1 #!./parrot
2 # Copyright (C) 2010, Parrot Foundation.
3 # $Id$
5 =head1 NAME
7 t/dynoplibs/pmc_pow.t - Test C<pow> on PMCs
9 =head1 SYNOPSIS
11     % prove t/dynoplibs/pmc_pew.t
13 =head1 DESCRIPTION
15 Test handling 3-arg C<pow> on PMCs.
17 =cut
19 .loadlib 'trans_ops'
21 .sub main :main
22     .include 'test_more.pir'
23     .include 'iglobals.pasm'
25     plan (4)
27     # Don't check BigInt or BigNum without gmp
28     .local pmc interp     # a handle to our interpreter object.
29     interp = getinterp
30     .local pmc config
31     config = interp[.IGLOBALS_CONFIG_HASH]
32     .local string gmp
33     gmp = config['gmp']
35     test_pow('Integer')
36     test_pow('Float')
38     if gmp goto do_big_ones
39         skip( 2, "will not test BigInt or BigNum without gmp" )
40         goto end
42   do_big_ones:
43     test_pow('BigInt')
44     test_pow('BigNum')
46   end:
47 .end
49 .sub test_pow
50     .param pmc type
52     $P0 = new type
53     $P0 = 40
54     $P1 = new type
55     $P1 = 2
56     $P2 = new type
57     $P2 = 115200
59     $P99 = $P2
61     $S0 = "original dest is untouched in pow for "
62     $S1 = type
63     concat $S0, $S1
65     # ignore exceptions
66     push_eh done
67     pow $P2, $P0, $P1
69     $I0 = cmp $P99, 115200
71     is( $I0, 0, $S0 )
72     goto end
74   done:
75     ok(1, 'ignoring exceptions')
76   end:
77 .end
80 # Local Variables:
81 #   mode: pir
82 #   fill-column: 100
83 # End:
84 # vim: expandtab shiftwidth=4 ft=pir: