[svn:parrot] r40814 - trunk/t/pmc

dukeleto at svn.parrot.org dukeleto at svn.parrot.org
Wed Aug 26 06:37:07 UTC 2009


Author: dukeleto
Date: Wed Aug 26 06:37:06 2009
New Revision: 40814
URL: https://trac.parrot.org/parrot/changeset/40814

Log:
[t] Convert t/pmc/parrotinterpreter.t to pir

Modified:
   trunk/t/pmc/parrotinterpreter.t

Modified: trunk/t/pmc/parrotinterpreter.t
==============================================================================
--- trunk/t/pmc/parrotinterpreter.t	Wed Aug 26 06:29:59 2009	(r40813)
+++ trunk/t/pmc/parrotinterpreter.t	Wed Aug 26 06:37:06 2009	(r40814)
@@ -1,13 +1,7 @@
-#!perl
-# Copyright (C) 2006-2007, Parrot Foundation.
+#!parrot
+# Copyright (C) 2006-2009, Parrot Foundation.
 # $Id$
 
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More;
-use Parrot::Test tests => 2;
-
 =head1 NAME
 
 t/pmc/parrotinterpreter.t - test the ParrotInterpreter PMC
@@ -23,19 +17,23 @@
 
 =cut
 
-pir_output_is( <<'CODE', <<'OUT', 'create new interpreter' );
-.sub 'test' :main
+.sub main :main
+    .include 'test_more.pir'
+
+    plan(3)
+    test_new()
+    test_hll_map()
+.end
+
+.sub test_new
     new $P0, ['ParrotInterpreter']
-    print "ok 1\n"
+    ok(1,'new')
 .end
-CODE
-ok 1
-OUT
 
-pir_output_is( <<'CODE', <<'OUT', 'setting HLL map dynamically' );
 .HLL 'Perl6'
 
-.sub 'main' :main
+.sub test_hll_map
+    .include 'test_more.pir'
     $P0 = get_class 'Integer'
     $P1 = subclass $P0, 'MyInt'
 
@@ -43,18 +41,14 @@
     $P2.'hll_map'($P0, $P1)
 
     $P3 = 'foo'()
-    say $P3                 # "3\n"
+    is($P3,3)
     $S0 = typeof $P3
-    say $S0                 # "MyInt"
+    is($S0,"MyInt")
 .end
 
-.sub 'foo'
+.sub foo
     .return (3)
 .end
-CODE
-3
-MyInt
-OUT
 
 # Local Variables:
 #   mode: cperl


More information about the parrot-commits mailing list