2 # Copyright (C) 2009-2010, Parrot Foundation.
7 t/pmc/packfilefixuptable.t - test the PackfileFixupTable PMC
13 % prove t/pmc/packfilefixuptable.t
17 Tests the PackfileFixupTable PMC.
21 # Having some known data would be helpful, here. For now, just make sure
22 # the values returned have the right types.
24 .include 't/pmc/testlib/packfile_common.pir'
26 .include 'test_more.pir'
33 # Report no ok for loading packfile failures
34 .sub report_load_error
37 .local string msg, aux
38 msg = concat desc, ' - error loading packfile: '
39 aux = except['message']
45 # Check unpackging FixupTable
47 .local pmc pf, pfdir, pftable, pfentry
48 .local int size, this, data
53 pftable = _get_fixup_table(pf)
54 isa_ok(pftable, 'PackfileFixupTable')
56 size = elements pftable
57 ok(size, "Got some elements")
61 pfentry = pftable[this]
63 eq name, "PackfileFixupEntry", next
64 $S0 = "PackfileFixupTable["
67 $S0 = concat "] returned an object of type: "
77 ok(1, "All elements of Table are Entries")
82 report_load_error($P0, "All elements of Table are Entries")
83 skip(2, "All elements of Table are Entries")
91 # vim: expandtab shiftwidth=4 ft=pir: