[svn:parrot] r43192 - trunk/t/dynpmc
bubaflub at svn.parrot.org
bubaflub at svn.parrot.org
Tue Dec 22 05:26:13 UTC 2009
Author: bubaflub
Date: Tue Dec 22 05:26:12 2009
New Revision: 43192
URL: https://trac.parrot.org/parrot/changeset/43192
Log:
converted t/dynpmc/subproxy.t to PIR
Modified:
trunk/t/dynpmc/subproxy.t
Modified: trunk/t/dynpmc/subproxy.t
==============================================================================
--- trunk/t/dynpmc/subproxy.t Tue Dec 22 03:46:10 2009 (r43191)
+++ trunk/t/dynpmc/subproxy.t Tue Dec 22 05:26:12 2009 (r43192)
@@ -1,14 +1,7 @@
-#! perl
-# Copyright (C) 2005-2007, Parrot Foundation.
+#! parrot
+# Copyright (C) 2005-2009, Parrot Foundation.
# $Id$
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More;
-use Parrot::Test tests => 2;
-use Parrot::Config;
-
=head1 NAME
t/dynpmc/subproxy.t - test if Sub is overridable via hll_map()
@@ -24,29 +17,32 @@
=cut
-pir_output_is( << 'CODE', << 'OUTPUT', "loadlib" );
.sub main :main
+ .include 'test_more.pir'
+ plan(3)
+
+ test_loadlib()
+ test_type_of_hll_mapped_sub()
+.end
+
+.sub test_loadlib
.local pmc lib
lib = loadlib "subproxy"
unless lib goto not_loaded
- print "ok\n"
- end
-not_loaded:
- print "not loaded\n"
-.end
-CODE
-ok
-OUTPUT
+ ok(1, 'loadlib')
+ .return()
+ not_loaded:
+ ok(1, 'loadlib')
+.end
-pir_output_is( << 'CODE', << 'OUTPUT', "test type of hll_map'ped .Sub" );
-.sub main :main
+.sub test_type_of_hll_mapped_sub
.local pmc b, f
b = get_global 'bar'
$S0 = typeof b
- say $S0
+ is($S0, 'Sub', "test type of hll_map'ped .Sub")
f = get_root_global ['some'], 'foo'
$S0 = typeof f
- say $S0
+ is($S0, 'SubProxy', "test type of hll_map'ped .Sub")
.end
.sub bar
@@ -67,14 +63,10 @@
.sub foo
noop
.end
-CODE
-Sub
-SubProxy
-OUTPUT
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 100
# End:
-# vim: expandtab shiftwidth=4:
+# vim: expandtab shiftwidth=4 filetype=pir:
More information about the parrot-commits
mailing list