cvsuser     03/07/31 11:51:27

  Modified:    t/op     conv.t
  Log:
  More extensive tests for conversion ops
  
  Revision  Changes    Path
  1.2       +52 -1     parrot/t/op/conv.t
  
  Index: conv.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/op/conv.t,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- conv.t    25 Nov 2002 15:54:47 -0000      1.1
  +++ conv.t    31 Jul 2003 18:51:27 -0000      1.2
  @@ -1,6 +1,6 @@
   #! perl -w
   
  -use Parrot::Test tests => 5;
  +use Parrot::Test tests => 8;
   use Test::More;
   
   output_is(<<'CODE', <<OUTPUT, "conv_i1_i");
  @@ -95,13 +95,64 @@
   
   
   output_is(<<'CODE', <<OUTPUT, "conv_i1_ofv_i");
  +    set I0, 127
  +    conv_i1_ovf I0
  +    print I0
  +    print "\n"
       set I0, 128
       conv_i1_ovf I0
       print I0
       print "\n"
       end
   CODE
  +127
   Overflow exception for conv_i1_ovf
  +OUTPUT
  +
  +
  +output_is(<<'CODE', <<OUTPUT, "conv_u1_ofv_i");
  +    set I0, 255
  +    conv_u1_ovf I0
  +    print I0
  +    print "\n"
  +    set I0, 256
  +    conv_u1_ovf I0
  +    print I0
  +    print "\n"
  +    end
  +CODE
  +255
  +Overflow exception for conv_u1_ovf
  +OUTPUT
  +
  +output_is(<<'CODE', <<OUTPUT, "conv_i2_ofv_i");
  +    set I0, 32767
  +    conv_i2_ovf I0
  +    print I0
  +    print "\n"
  +    inc I0
  +    conv_i2_ovf I0
  +    print I0
  +    print "\n"
  +    end
  +CODE
  +32767
  +Overflow exception for conv_i2_ovf
  +OUTPUT
  +
  +output_is(<<'CODE', <<OUTPUT, "conv_u2_ofv_i");
  +    set I0, 65535
  +    conv_u2_ovf I0
  +    print I0
  +    print "\n"
  +    inc I0
  +    conv_u2_ovf I0
  +    print I0
  +    print "\n"
  +    end
  +CODE
  +65535
  +Overflow exception for conv_u2_ovf
   OUTPUT
   
   1;
  
  
  

Reply via email to