2 # Copyright (C) 2009-2010, Parrot Foundation.
7 t/pmc/packfilefixupentry.t - test the PackfileFixupEntry PMC
12 % prove t/pmc/packfilefixupentry.t
16 Tests the PackfileFixupEntry PMC.
20 # Having some known data would be helpful, here. For now, just make sure
21 # the values returned seem sane.
23 .include 't/pmc/testlib/packfile_common.pir'
26 .include 'test_more.pir'
35 # sanity check we start with a PackfileFixupTable
37 .local pmc pf, pftable
42 pftable = _get_fixup_table(pf)
43 isa_ok(pftable, 'PackfileFixupTable')
48 report_load_error($P0, 'PackfileFixupTable')
53 # sanity check we end up with a PackfileFixupTable
54 .sub 'test_sanity_entry'
55 .local pmc pf, pftable, pfentry
60 pftable = _get_fixup_table(pf)
62 isa_ok(pfentry, 'PackfileFixupEntry')
67 report_load_error($P0, 'PackfileFixupEntry')
72 # PackfileFixupEntry methods .get_string(), .get_integer(), .get_type()
74 .local pmc pf, pftable, pfentry
75 .local int size, this, data
76 .local string name, label
80 pftable = _get_fixup_table(pf)
81 size = elements pftable
84 pfentry = pftable[this]
86 eq name, "PackfileFixupEntry", next
87 $S0 = "PackfileFixupTable["
90 $S0 = concat "] returned an object of type: "
105 report_load_error($P0, "Got entries")
113 # vim: expandtab shiftwidth=4 ft=pir: