Author: infinoid Date: Wed Jan 14 18:28:58 2009 New Revision: 35572 Modified: trunk/t/pmc/packfileconstanttable.t
Log: [pdd13] Fix some descriptions in packfileconstanttable.t. Add a sanity check to make sure we're dealing with the right segment of the PMC. Modified: trunk/t/pmc/packfileconstanttable.t ============================================================================== --- trunk/t/pmc/packfileconstanttable.t (original) +++ trunk/t/pmc/packfileconstanttable.t Wed Jan 14 18:28:58 2009 @@ -6,7 +6,7 @@ use warnings; use lib qw( . lib ../lib ../../lib ); use Test::More; -use Parrot::Test tests => 2; +use Parrot::Test tests => 3; use Parrot::Config; =head1 NAME @@ -50,6 +50,23 @@ EOF +# sanity check we have a PackfileConstantTable + +pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'sanity' ); +.sub 'test' :main + .local pmc pf, pfdir, pftable + .local string name + pf = _pbc() + pfdir = pf.'get_directory'() + pftable = pfdir[2] + name = typeof pftable + say name +.end +CODE +PackfileConstantTable +OUT + + # PackfileConstantTable.elements pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'elements' ); @@ -70,9 +87,9 @@ OUT -# PackfileRawSegment.get_integer_keyed_int +# PackfileConstantTable.get_type and PackfileConstantTable.get_*_keyed_int -pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'get_integer_keyed_int' ); +pir_output_is( <<'CODE' . $get_uuid_pbc, <<'OUT', 'get_type, get_*_keyed_int' ); .sub 'test' :main .local pmc pf, pfdir, pftable .local int size, this, type