1 # Copyright (C) 2007-2009, Parrot Foundation.
6 This example demonstrates writing tests using the PIR version of Test::More.
7 (Worth explaining a little of how ok, is, skip, and todo work.)
9 Also demonstrates exporting from one namespace to another (should be updated
10 to use particle's Exporter).
15 load_bytecode 'Test/More.pbc'
17 .local pmc exports, curr_namespace, test_namespace
18 curr_namespace = get_namespace
19 test_namespace = get_namespace [ 'Test'; 'More' ]
20 exports = split " ", "plan ok is isa_ok skip todo"
21 test_namespace.'export_to'(curr_namespace, exports)
28 is($I0, 2, "second test")
30 skip(1, "skipped test")
32 todo(1, 42, "todo test")
40 # vim: expandtab shiftwidth=4 ft=pir: