[svn:parrot] r39331 - branches/no_pmc_reuse/t/op
bacek at svn.parrot.org
bacek at svn.parrot.org
Tue Jun 2 09:42:20 UTC 2009
Author: bacek
Date: Tue Jun 2 09:42:20 2009
New Revision: 39331
URL: https://trac.parrot.org/parrot/changeset/39331
Log:
[t] Add initial test for 3-args arithmetic dest handling.
Modified:
branches/no_pmc_reuse/t/op/arithmetics.t
Modified: branches/no_pmc_reuse/t/op/arithmetics.t
==============================================================================
--- branches/no_pmc_reuse/t/op/arithmetics.t Tue Jun 2 09:41:46 2009 (r39330)
+++ branches/no_pmc_reuse/t/op/arithmetics.t Tue Jun 2 09:42:20 2009 (r39331)
@@ -7,7 +7,7 @@
use lib qw( . lib ../lib ../../lib );
use Test::More;
-use Parrot::Test tests => 23;
+use Parrot::Test tests => 24;
# test for GMP
use Parrot::Config;
@@ -639,6 +639,32 @@
-Inf
OUTPUT
+# We should generate more tests for all possible combinations
+pir_output_is( <<'CODE', <<OUTPUT, "Original dest is untouched in 3-args arithmetic" );
+.sub 'test' :main
+ $P0 = new 'Integer'
+ $P0 = 40
+ $P1 = new 'Integer'
+ $P1 = 2
+ $P2 = new 'Integer'
+
+ $P99 = $P2
+ $P2 = add $P0, $P1
+ say $P2
+ say $P99
+
+ $P99 = $P2
+ $P2 = concat $P0, $P1
+ say $P2
+ say $P99
+.end
+CODE
+42
+0
+402
+42
+OUTPUT
+
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
More information about the parrot-commits
mailing list