~dexter/parrot-pkg/maverick

« back to all changes in this revision

Viewing changes to t/pmc/testlib/packfile_common.pir

  • Committer: Piotr Roszatycki
  • Date: 2011-01-11 14:34:28 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: piotr.roszatycki@gmail.com-20110111143428-s7pa7qz38m61o4tw
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! parrot
2
2
# Copyright (C) 2009, Parrot Foundation.
3
 
# $Id: packfile_common.pir 48561 2010-08-18 06:14:20Z NotFound $
4
3
 
5
4
# Common functions for various Packfile* PMCs tests.
6
5
# Return test filename
21
20
    pf   = new ['Packfile']
22
21
    $S0  = '_filename'()
23
22
    pio  = new ['FileHandle']
24
 
    pio.'open'($S0, 'r')
 
23
    pio.'open'($S0, 'rb')
25
24
    $S0  = pio.'readall'()
26
25
    pio.'close'()
27
26
    pf   = $S0
64
63
    .return ()
65
64
.end
66
65
 
67
 
.sub '_get_fixup_table'
68
 
    .param pmc pf
69
 
 
70
 
    .tailcall '_find_segment_by_type'(pf, "PackfileFixupTable")
71
 
.end
72
 
 
73
 
 
74
66
# Report no ok for loading packfile failures
75
67
.sub report_load_error
76
68
    .param pmc except