# New Ticket Created by  Steven Schubiger 
# Please include the string:  [perl #34539]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=34539 >


> The test file t/pmc/pmc.t is full of Perl* tests. 
> These should be factored out into t/pmc/perl*.t.

> The file itself should contain just common PMC functionality tests, 
> like the range or type checks.

> Thanks,
> leo
Index: t/pmc/integer.t
===================================================================
RCS file: /cvs/public/parrot/t/pmc/integer.t,v
retrieving revision 1.4
diff -u -r1.4 integer.t
--- t/pmc/integer.t     Fri Mar  4 18:49:11 2005
+++ t/pmc/integer.t     Tue Mar 22 19:02:53 2005
@@ -1,4 +1,5 @@
 #! perl -w
+
 # Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
 # $Id: integer.t,v 1.4 2005/03/04 17:49:11 bernhard Exp $
 
@@ -16,7 +17,7 @@
 
 =cut
 
-use Parrot::Test tests => 9;
+use Parrot::Test tests => 10;
 
 pir_output_is(<< 'CODE', << 'OUTPUT', "basic math");
 
@@ -278,3 +279,30 @@
 0
 1
 OUTPUT
+
+output_is(<<'CODE', <<'OUTPUT', "if/unless with Integer PMC");
+      new P0, .Integer
+      set P0, 10
+      if P0, OK1
+      print "not "
+OK1:  print "ok 1\n"
+      unless P0, BAD2
+      branch OK2
+BAD2: print "not "
+OK2:  print "ok 2\n"
+      set P0, 0
+      if P0, BAD3
+      branch OK3
+BAD3: print "not "
+OK3:  print "ok 3\n"
+      unless P0, OK4
+      print "not "
+OK4:  print "ok 4\n"
+      end
+CODE
+ok 1
+ok 2
+ok 3
+ok 4
+OUTPUT
+

Reply via email to