cvsuser     04/08/05 08:19:16

  Modified:    t/op     arithmetics.t
  Log:
  More extensive tests for lcm ops
  
  Revision  Changes    Path
  1.13      +66 -3     parrot/t/op/arithmetics.t
  
  Index: arithmetics.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/op/arithmetics.t,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -w -r1.12 -r1.13
  --- arithmetics.t     12 May 2004 21:54:19 -0000      1.12
  +++ arithmetics.t     5 Aug 2004 15:19:16 -0000       1.13
  @@ -1,6 +1,6 @@
   #! perl -w
   # Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -# $Id: arithmetics.t,v 1.12 2004/05/12 21:54:19 jrieks Exp $
  +# $Id: arithmetics.t,v 1.13 2004/08/05 15:19:16 scog Exp $
   
   =head1 NAME
   
  @@ -17,7 +17,7 @@
   
   =cut
   
  -use Parrot::Test tests => 26;
  +use Parrot::Test tests => 27;
   use Test::More;
   
   my $fp_equality_macro = <<'ENDOFMACRO';
  @@ -589,7 +589,7 @@
   
   
   
  -output_is(<<'CODE', <<OUTPUT, "lcm");
  +output_is(<<'CODE', <<OUTPUT, "lcm_I_I_I");
           set I0, 10
           set I1, 10
           lcm I2, I1, I0
  @@ -611,13 +611,76 @@
           print "not "
   OK3:    print "ok 3\n"
   
  +        set I0, 10
  +        set I1, 0
  +        lcm I2, I1, I0
  +        eq I2, 0, OK4
  +        print "not "
  +OK4:    print "ok 4\n"
  +
  +        set I0, 0
  +        set I1, 10
  +        lcm I2, I1, I0
  +        eq I2, 0, OK5
  +        print "not "
  +OK5:    print "ok 5\n"
  +
  +        end
  +CODE
  +ok 1
  +ok 2
  +ok 3
  +ok 4
  +ok 5
  +OUTPUT
  +
  +output_is(<<"CODE", <<OUTPUT, "lcm_N_I_I");
  [EMAIL PROTECTED] $fp_equality_macro ]}
  +        set I0, 10
  +        set I1, 10
  +        lcm N2, I1, I0
  +        .fp_eq (N2, 10.0, OK1)
  +        print "not "
  +OK1:    print "ok 1\\n"
  +
  +        set I1, 17
  +        lcm N2, I1, I0
  +        .fp_eq(N2, 170.0, OK2)
  +        print N2
  +        print "not "
  +OK2:    print "ok 2\\n"
  +
  +        set I0, 17
  +        set I1, 10
  +        lcm N2, I1, I0
  +        .fp_eq(N2, 170.0, OK3)
  +        print "not "
  +OK3:    print "ok 3\\n"
  +
  +        set I0, 10
  +        set I1, 0
  +        lcm N2, I1, I0
  +        .fp_eq(N2, 0.0, OK4)
  +        print "not "
  +OK4:    print "ok 4\\n"
  +
  +        set I0, 0
  +        set I1, 10
  +        lcm N2, I1, I0
  +        .fp_eq(N2, 0.0, OK5)
  +        print "not "
  +OK5:    print "ok 5\\n"
  +
           end
   CODE
   ok 1
   ok 2
   ok 3
  +ok 4
  +ok 5
   OUTPUT
   
  +
   output_is(<<'CODE', <<OUTPUT, "gcd(int,int,int)");
           set I0, 125
           set I1, 15
  
  
  

Reply via email to