diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-07-23 09:34:17 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-07-23 09:34:17 +0000 |
commit | 2d83907e2d37f04aa8bebd938b737189d59eb62d (patch) | |
tree | c42d29083d95e098f521591b156a3f1df55bf2b8 /test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java | |
parent | 8091bd11210ac68aa3289532643e42b66545a495 (diff) | |
download | xmlgraphics-fop-2d83907e2d37f04aa8bebd938b737189d59eb62d.tar.gz xmlgraphics-fop-2d83907e2d37f04aa8bebd938b737189d59eb62d.zip |
Improved/fixed font setup for painters. Reduced the whole thing to pass in a fully set-up FontInfo object to reduce dependencies on the font package to the necessary.
Fixed problem with some JAXP implementations for "lastProprties" in IFParser.
Support for XMP parsing added in IFParser.
Added round-trip testing for new IF.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@679047 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java')
-rw-r--r-- | test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java b/test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java new file mode 100644 index 000000000..2c7bd09e4 --- /dev/null +++ b/test/java/org/apache/fop/intermediate/AreaTreeXMLFormatTestSuite.java @@ -0,0 +1,71 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* $Id$ */ + +package org.apache.fop.intermediate; + +import java.io.File; +import java.io.IOException; +import java.util.Collection; +import java.util.Iterator; + +import junit.framework.Test; +import junit.framework.TestSuite; + +import org.apache.fop.layoutengine.LayoutEngineTestSuite; + +/** + * JUnit test suite for the area tree XML format + */ +public class AreaTreeXMLFormatTestSuite { + + /** + * @return the test suite with all the tests (one for each XML file) + * @throws IOException in case of an I/O problem + */ + public static Test suite() throws IOException { + TestSuite suite = new TestSuite(); + + Collection files = LayoutEngineTestSuite.getTestFiles(); + + Iterator i = files.iterator(); + while (i.hasNext()) { + File f = (File)i.next(); + addATTestCase(suite, f); + } + + return suite; + } + + private static void addATTestCase(TestSuite suite, + final File f) { + suite.addTest(new AreaTreeParserTestCase(f) { + public void runTest() throws Exception { + try { + testParserToIntermediateFormat(); + testParserToPDF(); + } catch (Exception e) { + org.apache.commons.logging.LogFactory.getLog( + this.getClass()).error("Error on " + f.getName()); + throw e; + } + } + }); + } + +} |