cvsuser 04/12/21 13:15:32
Modified: t/pmc float.t Log: Add test for abs op Revision Changes Path 1.9 +33 -2 parrot/t/pmc/float.t Index: float.t =================================================================== RCS file: /cvs/public/parrot/t/pmc/float.t,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- float.t 16 Dec 2004 19:22:46 -0000 1.8 +++ float.t 21 Dec 2004 21:15:32 -0000 1.9 @@ -1,6 +1,6 @@ #! perl -w # Copyright: 2001-2003 The Perl Foundation. All Rights Reserved. -# $Id: float.t,v 1.8 2004/12/16 19:22:46 chromatic Exp $ +# $Id: float.t,v 1.9 2004/12/21 21:15:32 scog Exp $ =head1 NAME @@ -16,7 +16,7 @@ =cut -use Parrot::Test tests => 27; +use Parrot::Test tests => 28; my $fp_equality_macro = <<'ENDOFMACRO'; .macro fp_eq ( J, K, L ) @@ -791,3 +791,34 @@ 1 0 OUTPUT + +output_is(<< "CODE", << 'OUTPUT', "Abs"); [EMAIL PROTECTED] $fp_equality_macro ]} + new P0, .Float + set P0, 1.0 + abs P0 + eq P0, P0, OK1 + print P0 + print "not " +OK1: print "ok 1\\n" + + set P0, -1.0 + abs P0 + .fp_eq(P0, 1.0, OK2) + print P0 + print "not " +OK2: print "ok 2\\n" + + new P1, .Float + set P0, -5.0 + abs P1, P0 + .fp_eq(P1, 5.0, OK3) + print P1 + print "not " +OK3: print "ok 3\\n" + end +CODE +ok 1 +ok 2 +ok 3 +OUTPUT
