2 # Copyright (C) 2001-2009, 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( 34, "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)
57 test_bitwise_shr(type)
59 test_bitwise_shl(type)
60 test_bitwise_xor(type)
64 test_bitwise_lsr(type)
65 test_bitwise_and(type)
80 $S0 = "original dest is untouched in add for "
88 $I0 = cmp $P99, 115200
94 ok(1, 'ignoring exceptions')
110 $S0 = "original dest is untouched in divide for "
118 $I0 = cmp $P99, 115200
124 ok(1, 'ignoring exceptions')
140 $S0 = "original dest is untouched in multiply for "
148 $I0 = cmp $P99, 115200
154 ok(1, 'ignoring exceptions')
158 .sub test_floor_divide
170 $S0 = "original dest is untouched in floor_divide for "
178 $I0 = cmp $P99, 115200
184 ok(1, 'ignoring exceptions')
188 .sub test_logical_and
200 $S0 = "original dest is untouched in logical_and for "
208 $I0 = cmp $P99, 115200
214 ok(1, 'ignoring exceptions')
218 .sub test_concatenate
230 $S0 = "original dest is untouched in concatenate for "
238 $I0 = cmp $P99, 115200
244 ok(1, 'ignoring exceptions')
248 .sub test_logical_xor
260 $S0 = "original dest is untouched in logical_xor for "
268 $I0 = cmp $P99, 115200
274 ok(1, 'ignoring exceptions')
290 $S0 = "original dest is untouched in logical_or for "
298 $I0 = cmp $P99, 115200
304 ok(1, 'ignoring exceptions')
308 .sub test_bitwise_shr
320 $S0 = "original dest is untouched in bitwise_shr for "
328 $I0 = cmp $P99, 115200
334 ok(1, 'ignoring exceptions')
350 $S0 = "original dest is untouched in bitwise_or for "
358 $I0 = cmp $P99, 115200
364 ok(1, 'ignoring exceptions')
368 .sub test_bitwise_shl
380 $S0 = "original dest is untouched in bitwise_shl for "
388 $I0 = cmp $P99, 115200
394 ok(1, 'ignoring exceptions')
398 .sub test_bitwise_xor
410 $S0 = "original dest is untouched in bitwise_xor for "
418 $I0 = cmp $P99, 115200
424 ok(1, 'ignoring exceptions')
440 $S0 = "original dest is untouched in modulus for "
448 $I0 = cmp $P99, 115200
454 ok(1, 'ignoring exceptions')
470 $S0 = "original dest is untouched in pow for "
478 $I0 = cmp $P99, 115200
484 ok(1, 'ignoring exceptions')
500 $S0 = "original dest is untouched in subtract for "
508 $I0 = cmp $P99, 115200
514 ok(1, 'ignoring exceptions')
518 .sub test_bitwise_lsr
530 $S0 = "original dest is untouched in bitwise_lsr for "
538 $I0 = cmp $P99, 115200
544 ok(1, 'ignoring exceptions')
548 .sub test_bitwise_and
560 $S0 = "original dest is untouched in bitwise_and for "
568 $I0 = cmp $P99, 115200
574 ok(1, 'ignoring exceptions')
580 # cperl-indent-level: 4
583 # vim: expandtab shiftwidth=4 ft=pir :