[svn:parrot] r39323 - trunk/t/op

bacek at svn.parrot.org bacek at svn.parrot.org
Tue Jun 2 09:18:50 UTC 2009


Author: bacek
Date: Tue Jun  2 09:18:50 2009
New Revision: 39323
URL: https://trac.parrot.org/parrot/changeset/39323

Log:
[t] Add initial test for 3-args arithmetic dest handling.

Modified:
   trunk/t/op/arithmetics.t

Modified: trunk/t/op/arithmetics.t
==============================================================================
--- trunk/t/op/arithmetics.t	Tue Jun  2 09:18:26 2009	(r39322)
+++ trunk/t/op/arithmetics.t	Tue Jun  2 09:18:50 2009	(r39323)
@@ -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