Author: coke
Date: Thu Mar 29 10:48:57 2007
New Revision: 17840

Modified:
   trunk/   (props changed)
   trunk/t/pmc/role.t

Log:
per particle, convert test to PIR from perl.



Modified: trunk/t/pmc/role.t
==============================================================================
--- trunk/t/pmc/role.t  (original)
+++ trunk/t/pmc/role.t  Thu Mar 29 10:48:57 2007
@@ -1,13 +1,7 @@
-#!perl
+#! parrot
 # Copyright (C) 2007, The Perl Foundation.
 # $Id$
 
-use strict;
-use warnings;
-use lib qw( . lib ../lib ../../lib );
-use Test::More;
-use Parrot::Test tests => 1;
-
 =head1 NAME
 
 t/pmc/role.t - test the Role PMC
@@ -24,21 +18,29 @@
 
 # L<PDD15/Role PMC API>
 # TODO fix smartlinks once this is specced
-pir_output_is( <<'CODE', <<'OUT', 'new' );
-.sub 'test' :main
+
+.sub main :main
+    # load this library
+    load_bytecode 'library/Test/More.pir'
+
+    # get the testing functions
+    .local pmc exports, curr_namespace, test_namespace
+    curr_namespace = get_namespace
+    test_namespace = get_namespace [ "Test::More" ]
+    exports = split " ", "plan diag ok is is_deeply like isa_ok"
+
+    test_namespace."export_to"(curr_namespace, exports)
+
+    plan(2)
+
+    
     $P0 = new .Role
-    say 'ok 1 - $P0 = new .Role'
+    ok(1, 'Role type exists') # or we've already died.
+
 
     $I0 = isa $P0, 'Role'
-    if $I0 goto ok_2
-    print 'not '
-  ok_2:
-    say "ok 2 - isa $P0, 'Role'"
+    is($I0, 1, 'isa Role')
 .end
-CODE
-ok 1 - $P0 = new .Role
-ok 2 - isa $P0, 'Role'
-OUT
 
 ## TODO add more tests as this is documented and implemented
 

Reply via email to