[svn:parrot] r41184 - trunk/t/pmc
bacek at svn.parrot.org
bacek at svn.parrot.org
Thu Sep 10 21:22:31 UTC 2009
Author: bacek
Date: Thu Sep 10 21:22:31 2009
New Revision: 41184
URL: https://trac.parrot.org/parrot/changeset/41184
Log:
[t] Add todoed ticket for TT#132
Modified:
trunk/t/pmc/sub.t
Modified: trunk/t/pmc/sub.t
==============================================================================
--- trunk/t/pmc/sub.t Thu Sep 10 21:15:25 2009 (r41183)
+++ trunk/t/pmc/sub.t Thu Sep 10 21:22:31 2009 (r41184)
@@ -9,7 +9,7 @@
use Test::More;
use Parrot::Test::Util 'create_tempfile';
-use Parrot::Test tests => 67;
+use Parrot::Test tests => 68;
use Parrot::Config;
=head1 NAME
@@ -1589,6 +1589,47 @@
bazsubid
OUTPUT
+pir_output_is( <<'CODE', <<'OUTPUT', 'Thaw PIR subclass', todo => 'See TT#132' );
+.sub main :main
+
+ $P0 = get_class 'Sub'
+ $P1 = subclass $P0, 'myProc'
+
+ .local pmc pirC
+ pirC = compreg 'PIR'
+
+ .local string code
+ code = <<"END_CODE"
+
+.sub bar
+ say "hi"
+.end
+END_CODE
+
+ .local pmc compiled
+ compiled = pirC(code)
+ compiled = compiled[0] # just want the first executable sub here.
+
+ compiled() # works
+
+ .local pmc sub
+ sub = new 'myProc'
+ assign sub, compiled
+ sub() # works
+
+ $S0 = freeze sub
+ say "frozen"
+ $P2 = thaw $S0
+ say "thawed"
+ $P2()
+.end
+CODE
+hi
+hi
+frozen
+thawed
+hi
+OUTPUT
# Local Variables:
# mode: cperl
More information about the parrot-commits
mailing list