cvsuser     04/06/23 10:09:23

  Modified:    .        CREDITS
               t/pmc    objects.t
  Log:
  Pie-thon 7 - add (manual) MMD test case
  
  Revision  Changes    Path
  1.24      +4 -0      parrot/CREDITS
  
  Index: CREDITS
  ===================================================================
  RCS file: /cvs/public/parrot/CREDITS,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -w -r1.23 -r1.24
  --- CREDITS   22 Jun 2004 08:35:43 -0000      1.23
  +++ CREDITS   23 Jun 2004 17:09:19 -0000      1.24
  @@ -20,6 +20,7 @@
   N: Aldo Calpini
   
   N: Alex Gough
  +D: bignum
   
   N: Andy Dougherty
   D: Config and building.
  @@ -88,6 +89,9 @@
   N: H.Merijn Brand
   D: HP-UX fixes and smoke tests
   
  +N: Ion Alexandru Morega
  +D: string.pmc
  +
   N: Jarkko Hietaniemi
   D: packfile and Tru64 fixes
   D: lot of general hints and patches to improve portability
  
  
  
  1.47      +50 -2     parrot/t/pmc/objects.t
  
  Index: objects.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/pmc/objects.t,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -w -r1.46 -r1.47
  --- objects.t 23 Jun 2004 13:25:07 -0000      1.46
  +++ objects.t 23 Jun 2004 17:09:23 -0000      1.47
  @@ -1,6 +1,6 @@
   #! perl -w
   # Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -# $Id: objects.t,v 1.46 2004/06/23 13:25:07 leo Exp $
  +# $Id: objects.t,v 1.47 2004/06/23 17:09:23 leo Exp $
   
   =head1 NAME
   
  @@ -16,7 +16,7 @@
   
   =cut
   
  -use Parrot::Test tests => 42;
  +use Parrot::Test tests => 43;
   use Test::More;
   
   output_is(<<'CODE', <<'OUTPUT', "findclass (base class)");
  @@ -1259,3 +1259,51 @@
   42
   MyInt(42)
   OUTPUT
  +
  +output_is(<<'CODE', <<'OUTPUT', "PMC as classes - overrid mmd methods");
  +##PIR##
  +.sub main @MAIN
  +  .local pmc MyInt
  +  getclass $P0, "Integer"
  +  subclass MyInt, $P0, "MyInt"
  +  .local pmc i
  +  .local pmc j
  +  .local pmc k
  +  $I0 = find_type "MyInt"
  +  i = new $I0
  +  j = new $I0
  +  k = new $I0
  +  i = 6
  +  j = 7
  +  .local pmc add_sub
  +  add_sub = find_global "MyInt", "__add"
  +  .include "mmd.pasm"
  +  mmdvtregister .MMD_ADD, $I0, 0, add_sub
  +  k = i + j
  +  print k
  +  print "\n"
  +  j = new PerlInt
  +  j = 100
  +  k = i + j
  +  print k
  +  print "\n"
  +.end
  +
  +.namespace ["MyInt"]
  +.sub __add
  +   .param pmc self
  +   .param pmc right
  +   .param pmc dest
  +   print "in add\n"
  +   $I0 = classoffset self, "MyInt"
  +   $P0 = getattribute self, $I0
  +   $I0 = $P0
  +   $I1 = right
  +   $I2 = $I0 + $I1
  +   dest = $I2
  +.end
  +CODE
  +in add
  +13
  +106
  +OUTPUT
  
  
  

Reply via email to