[svn:parrot] r40572 - trunk/t/op

chromatic at svn.parrot.org chromatic at svn.parrot.org
Sat Aug 15 19:38:26 UTC 2009


Author: chromatic
Date: Sat Aug 15 19:38:25 2009
New Revision: 40572
URL: https://trac.parrot.org/parrot/changeset/40572

Log:
[t] Revised the "Garbage collection shouldn't sweep up singleton PMCs" test to
use the Env PMC instead of the now-removed Random PMC.

Modified:
   trunk/t/op/gc.t

Modified: trunk/t/op/gc.t
==============================================================================
--- trunk/t/op/gc.t	Sat Aug 15 19:06:51 2009	(r40571)
+++ trunk/t/op/gc.t	Sat Aug 15 19:38:25 2009	(r40572)
@@ -1,5 +1,5 @@
 #!perl
-# Copyright (C) 2001-2005, Parrot Foundation.
+# Copyright (C) 2001-2009, Parrot Foundation.
 # $Id$
 
 use strict;
@@ -123,12 +123,11 @@
 1
 OUTPUT
 
-{
-local $TODO = 'this tests singletons but was tied to the now-gone Random PMC';
-
-pasm_output_is( <<'CODE', <<OUTPUT, "vanishing slingleton PMC" );
+pasm_output_is( <<'CODE', <<OUTPUT, "vanishing singleton PMC" );
 _main:
     .const 'Sub' P0 = "_rand"
+    new P16, 'Env'
+    set P16['Foo'], 'bar'
     set I16, 100
     set I17, 0
 loop:
@@ -140,14 +139,13 @@
     end
 
 .pcc_sub _rand:
-    new P16, 'Random'
-    set I5, P16[10]
-    gt I5, 10, err
-    lt I5, 0, err
+    new P16, 'Env'
+    set P5, P16['Foo']
+    ne P5, 'bar', err
     returncc
 err:
-    print "singleton destroyed .Random = ."
-    new P16, 'Random'
+    print "singleton destroyed .Env = ."
+    new P16, 'Env'
     typeof S16, P16
     print S16
     print "\n"
@@ -155,7 +153,6 @@
 CODE
 ok
 OUTPUT
-}
 
 pir_output_is( <<'CODE', <<OUTPUT, "vanishing return continuation in method calls" );
 .sub main :main


More information about the parrot-commits mailing list