Author: allison Date: Tue May 15 10:45:56 2007 New Revision: 18550 Modified: trunk/languages/punie/t/op_math.t
Log: [punie]: Add a test for complex interactions between simple math ops (Shlomi Fish). Modified: trunk/languages/punie/t/op_math.t ============================================================================== --- trunk/languages/punie/t/op_math.t (original) +++ trunk/languages/punie/t/op_math.t Tue May 15 10:45:56 2007 @@ -3,7 +3,7 @@ use strict; use warnings; use lib qw(t . lib ../lib ../../lib ../../../lib); -use Parrot::Test tests => 2; +use Parrot::Test tests => 3; language_output_is( 'punie', <<'CODE', <<'OUT', 'simple math ops' ); print 1 + 2, "\n"; @@ -33,6 +33,24 @@ 32 OUT +language_output_is( 'punie', <<'CODE', <<'OUT', 'combined math ops' ); +print 3 + 4 * 5, "\n"; +print 3 * 4 + 5, "\n"; +print 0 + ((2 + 3) * 7), "\n"; +print 1 * 2 * 3 * 4, "\n"; +print (5 * 6, "\n"); +print 2 + (5 - 4) * 3, "\n"; +print 2 + 5 - 4 * 3, "\n"; +CODE +23 +17 +35 +24 +30 +5 +-5 +OUT + # Local Variables: # mode: cperl # cperl-indent-level: 4
