cvsuser     04/02/25 16:03:25

  Modified:    t/pmc    objects.t
  Log:
   Fix test 21 -- the attribute value is the actual PMC, not a copy
   Also fix tests that were doing evil things to attribute slots 0 & 1
  
  Revision  Changes    Path
  1.22      +23 -43    parrot/t/pmc/objects.t
  
  Index: objects.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/pmc/objects.t,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -w -r1.21 -r1.22
  --- objects.t 25 Feb 2004 23:50:09 -0000      1.21
  +++ objects.t 26 Feb 2004 00:03:25 -0000      1.22
  @@ -1,6 +1,6 @@
   #! perl -w
   # Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -# $Id: objects.t,v 1.21 2004/02/25 23:50:09 dan Exp $
  +# $Id: objects.t,v 1.22 2004/02/26 00:03:25 scog Exp $
   
   =head1 NAME
   
  @@ -357,10 +357,10 @@
   
       new P3, .PerlInt
       set P3, 1024
  -    setattribute P2, 0, P3
  +    setattribute P2, 2, P3
   
       new P4, .PerlInt
  -    getattribute P4, P2, 0
  +    getattribute P4, P2, 2
       print P4
       print "\n"
       end
  @@ -380,13 +380,13 @@
       new P4, .PerlHash
       set P4["Key"], "Value" 
   
  -    setattribute P2, 0, P3
  -    setattribute P2, 1, P4
  +    setattribute P2, 2, P3
  +    setattribute P2, 3, P4
   
  -    getattribute P5, P2, 0
  +    getattribute P5, P2, 2
       print P5
       print "\n"
  -    getattribute P6, P2, 1
  +    getattribute P6, P2, 3
       set S0, P6["Key"]
       print S0
       print "\n"
  @@ -427,15 +427,15 @@
   
       new P4, .PerlInt
       set P4, 100
  -    setattribute P2, 0, P4
  +    setattribute P2, 2, P4
       new P5, .PerlString
       set P5, "One hundred"
  -    setattribute P3, 0, P5
  +    setattribute P3, 2, P5
   
  -    getattribute P6, P2, 0
  +    getattribute P6, P2, 2
       print P6
       print "\n"
  -    getattribute P6, P3, 0
  +    getattribute P6, P3, 2
       print P6
       print "\n"
       end
  @@ -458,57 +458,37 @@
    
       new P4, .PerlInt
       set P4, 10
  -    setattribute P2, 0, P4
  -    inc P4
  -    setattribute P2, 1, P4
  -    inc P4
       setattribute P2, 2, P4
       inc P4
       setattribute P2, 3, P4
   
  -    set P4, 100
  -    setattribute P3, 0, P4
  -    inc P4
  -    setattribute P3, 1, P4
  -    inc P4
  -    setattribute P3, 2, P4
  -    inc P4
  -    setattribute P3, 3, P4
  -
  +    new P5, .PerlInt
  +    set P5, 100
  +    setattribute P3, 2, P5
  +    inc P5
  +    setattribute P3, 3, P5
   
  -    getattribute P5, P2, 0
  +    getattribute P6, P2, 2
       bsr l1
  -    getattribute P5, P2, 1
  -    bsr l1
  -    getattribute P5, P2, 2
  -    bsr l1
  -    getattribute P5, P2, 3
  +    getattribute P6, P2, 3
       bsr l1
   
  -    getattribute P5, P3, 0
  -    bsr l1
  -    getattribute P5, P3, 1
  -    bsr l1
  -    getattribute P5, P3, 2
  +    getattribute P6, P3, 2
       bsr l1
  -    getattribute P5, P3, 3
  +    getattribute P6, P3, 3
       bsr l1
       branch end
   l1:
  -    print P5
  +    print P6
       print "\n"
       ret
   end:
       end
   CODE
  -10
   11
  -12
  -13
  -100
  +11
  +101
   101
  -102
  -103
   OUTPUT
   
   output_is(<<'CODE', <<'OUTPUT', "classoffset (single class)");
  
  
  

Reply via email to