2 # Copyright (C) 2001-2010, Parrot Foundation.
7 t/op/arithmetics_pmc.t - Arithmetic Ops involving PMCs
11 % prove t/op/arithmetics_pmc.t
15 Test handling C<dest> arg in 3-args arithmetic.
20 .include 'test_more.pir'
21 .include "iglobals.pasm"
25 # Don't check BigInt or BigNum without gmp
26 .local pmc interp # a handle to our interpreter object.
29 config = interp[.IGLOBALS_CONFIG_HASH]
33 run_tests_for('Integer')
34 run_tests_for('Float')
36 if gmp goto do_big_ones
37 skip( 20, "will not test BigInt or BigNum without gmp" )
41 run_tests_for('BigInt')
42 run_tests_for('BigNum')
52 test_floor_divide(type)
53 test_logical_and(type)
54 test_concatenate(type)
55 test_logical_xor(type)
73 $S0 = "original dest is untouched in add for "
81 $I0 = cmp $P99, 115200
87 ok(1, 'ignoring exceptions')
103 $S0 = "original dest is untouched in divide for "
111 $I0 = cmp $P99, 115200
117 ok(1, 'ignoring exceptions')
133 $S0 = "original dest is untouched in multiply for "
141 $I0 = cmp $P99, 115200
147 ok(1, 'ignoring exceptions')
151 .sub test_floor_divide
163 $S0 = "original dest is untouched in floor_divide for "
171 $I0 = cmp $P99, 115200
177 ok(1, 'ignoring exceptions')
181 .sub test_logical_and
193 $S0 = "original dest is untouched in logical_and for "
201 $I0 = cmp $P99, 115200
207 ok(1, 'ignoring exceptions')
211 .sub test_concatenate
223 $S0 = "original dest is untouched in concatenate for "
231 $I0 = cmp $P99, 115200
237 ok(1, 'ignoring exceptions')
241 .sub test_logical_xor
253 $S0 = "original dest is untouched in logical_xor for "
261 $I0 = cmp $P99, 115200
267 ok(1, 'ignoring exceptions')
283 $S0 = "original dest is untouched in logical_or for "
291 $I0 = cmp $P99, 115200
297 ok(1, 'ignoring exceptions')
313 $S0 = "original dest is untouched in modulus for "
321 $I0 = cmp $P99, 115200
327 ok(1, 'ignoring exceptions')
343 $S0 = "original dest is untouched in subtract for "
351 $I0 = cmp $P99, 115200
357 ok(1, 'ignoring exceptions')
365 # vim: expandtab shiftwidth=4 ft=pir: