tagged release 0.7.1
[parrot.git] / runtime / parrot / include / test_more.pir
blob3d1e46df50afa92e211ef7500b3e20d0d62343c0
1 =head1 Purpose
3 contain all the boilerplate code for starting off a test written in PIR using
4 Test::More's subs.
6 Imports several subs into the current namespace from Test::More.
8 This is intended to be broadly usable. Feel free to use Test::More
9 directly, of course, but this provides a handy shortcut for setting up
10 simple test file written in parrot.
12 =cut
14     load_bytecode 'runtime/parrot/library/Test/More.pbc'
16     # get the testing functions
17     .local pmc exports, curr_namespace, test_namespace
18     curr_namespace = get_namespace
19     test_namespace = get_root_namespace [ 'parrot'; 'Test'; 'More' ]
20     exports = split " ", "plan diag ok is is_deeply like isa_ok skip isnt"
22     test_namespace."export_to"(curr_namespace, exports)
24 # Local Variables:
25 #   mode: pir
26 #   fill-column: 100
27 # End:
28 # vim: expandtab shiftwidth=4 ft=pir: