FOP Layout Engine Tests

FOP’s layout engine tests are integrated with other JUnit tests that are run in the FOP build process. Each test includes a complete FO document, and assertions are made (and checked) about the FOP-specific area-tree that results from formatting the FO document with FOP.

The following is the example test document from

      This test checks <something>.....
    <fo:root xmlns:fo="" xmlns:svg="">
        <!-- etc. etc. -->
        <fo:block-container background-image="##img">
        <!-- etc. etc. -->
    <eval expected="0 0 360000 360000" xpath="/areaTree/pageSequence/pageViewport/@bounds" desc="page size"/>
    <true xpath="/areaTree/pageSequence/pageViewport/page[1]"/>
    <true xpath="not(/areaTree/pageSequence/pageViewport/page[2])"/>
    <eval expected="0 0 360000 360000" xpath="/areaTree/pageSequence/pageViewport/page[1]/regionViewport/@rect" desc="region body area"/>