Hi, I search for a possibility to run the unit tests just inside idea.
If I let idea compile all the classes, coping the fo files and letting ant generate the source files, it runs 2110 test, but fails 1737 of them. Some of the errors: No IF document handler for the requested format available: application/pdf Don't know how to handle "application/pdf" as an output format. Neither an FOEventHandler, nor a Renderer could be found for this output format. The file format is not supported. No ImagePreloader found for test/resources/images/img-w-size.svg Event model doesn't contain the definition for org.apache.fop.fo.FOValidationEventProducer Class org.apache.fop.intermediate.IFParserTestCase has no public constructor TestCase(String name) or TestCase() No IF document handler for the requested format available: application/postscript --------------------------------------------------------------------- Looks like configuration issues to me. So what can I do to be able to run the unit tests? One other related problem: I don't get the hyphenation unit tests to run with Ant. I have the fop-hyph-1.2.jar in the classpath. I use Java 1.4, JUnit 3.8 and Ant 1.7. If I run junit-layout-hypenation, I get 5 errors out of 8 tests. I have attached the ant output. Best Regards Alex -- e-mail: [email protected] web: www.alexanderkiel.net
Buildfile: build.xml
init-avail:
[echo] ------------------- Apache FOP svn-trunk [1999-2009] ----------------
[echo] See build.properties and build-local.properties for additional build settings
[echo] Apache Ant version 1.7.1 compiled on November 10 2008
[echo] VM: 1.4.2_19-b04, Sun Microsystems Inc.
[echo] JAVA_HOME: /home/akiel/j2sdk1.4.2_19/
[echo] JAI Support PRESENT
[echo] JCE Support PRESENT
[echo] JUnit Support PRESENT
[echo] XMLUnit Support PRESENT
init:
codegen:
[echo] Generating the java files from xml resources
compile-java:
resourcegen:
compile-copy-resources:
compile:
retro-avail:
retro-unavail:
[echo] Please set the path to a JDK 1.4 installation in your build-local.properties
[echo] to allow for verification!
retro:
uptodate-jar-main:
jar-main:
compile-hyphenation:
[echo] Hyphenation successful
uptodate-jar-hyphenation:
jar-hyphenation:
uptodate-jar-sandbox:
jar-sandbox:
package:
uptodate-transcoder-pkg:
transcoder-pkg:
junit-with-xmlunit:
junit-without-xmlunit:
junit-compile-java:
junit-compile-copy-resources:
junit-compile:
hyphenation-present:
[echo] Hyphenation Support PRESENT
junit-layout-hyphenation:
[echo] Running hyphenation layout engine tests
[junit] Testsuite: org.apache.fop.layoutengine.LayoutEngineTestSuite
[junit] Tests run: 8, Failures: 0, Errors: 5, Time elapsed: 1.759 sec
[junit]
[junit] ------------- Standard Output ---------------
[junit] Test: block_uax14_linebreaking_hyph.xml
[junit] [WARN ] Line 4 of a paragraph overflows the available area by more than 50 points. (No context info available)
[junit] [WARN ] Line 2 of a paragraph overflows the available area by 34448 millipoints. (No context info available)
[junit] [WARN ] Line 1 of a paragraph overflows the available area by 46688 millipoints. (No context info available)
[junit] Test: inline_border_padding_hyphenate_de.xml
[junit] [WARN ] Line 3 of a paragraph overflows the available area by 31390 millipoints. (No context info available)
[junit] [WARN ] Line 3 of a paragraph overflows the available area by 31390 millipoints. (No context info available)
[junit] [WARN ] Line 3 of a paragraph overflows the available area by 31390 millipoints. (No context info available)
[junit] [WARN ] Line 3 of a paragraph overflows the available area by 31390 millipoints. (No context info available)
[junit] [WARN ] Line 3 of a paragraph overflows the available area by 37390 millipoints. (No context info available)
[junit] [WARN ] Line 3 of a paragraph overflows the available area by 37390 millipoints. (No context info available)
[junit] [WARN ] Line 3 of a paragraph overflows the available area by 37390 millipoints. (No context info available)
[junit] [WARN ] Line 3 of a paragraph overflows the available area by 37390 millipoints. (No context info available)
[junit] ------------- ---------------- ---------------
[junit] ------------- Standard Error -----------------
[junit] Sep 25, 2009 5:39:04 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
[junit] SEVERE: Couldn't find hyphenation pattern en
[junit] Sep 25, 2009 5:39:05 PM org.apache.fop.layoutengine.LayoutEngineTestSuite$1 runTest
[junit] SEVERE: Error on inline_border_padding_hyphenate.xml
[junit] Sep 25, 2009 5:39:05 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
[junit] SEVERE: Couldn't find hyphenation pattern en_US
[junit] Sep 25, 2009 5:39:05 PM org.apache.fop.layoutengine.LayoutEngineTestSuite$1 runTest
[junit] SEVERE: Error on block_hyphenation_kerning.xml
[junit] Sep 25, 2009 5:39:05 PM org.apache.fop.hyphenation.Hyphenator getHyphenationTree
[junit] SEVERE: Couldn't find hyphenation pattern de
[junit] Sep 25, 2009 5:39:05 PM org.apache.fop.layoutengine.LayoutEngineTestSuite$1 runTest
[junit] SEVERE: Error on block_uax14_linebreaking_hyph.xml
[junit] Sep 25, 2009 5:39:05 PM org.apache.fop.layoutengine.LayoutEngineTestSuite$1 runTest
[junit] SEVERE: Error on inline_border_padding_hyphenate_de.xml
[junit] Sep 25, 2009 5:39:05 PM org.apache.fop.layoutengine.LayoutEngineTestSuite$1 runTest
[junit] SEVERE: Error on block_hyphenation-ladder-count.xml
[junit] ------------- ---------------- ---------------
[junit] Testcase: inline_border_padding_hyphenate.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1): Caused an ERROR
[junit] Expected XPath expression to evaluate to '39570', but got '35570' (XPath: //flow/block[1]/lineArea[3]/inlineparent/@ipda)
[junit] java.lang.RuntimeException: Expected XPath expression to evaluate to '39570', but got '35570' (XPath: //flow/block[1]/lineArea[3]/inlineparent/@ipda)
[junit] at org.apache.fop.layoutengine.EvalCheck.doCheck(EvalCheck.java:96)
[junit] at org.apache.fop.layoutengine.EvalCheck.check(EvalCheck.java:70)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.doATChecks(LayoutEngineTester.java:222)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.doATChecks(LayoutEngineTester.java:215)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.checkAll(LayoutEngineTester.java:188)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.runTest(LayoutEngineTester.java:142)
[junit] at org.apache.fop.layoutengine.LayoutEngineTestSuite$LayoutEngineTestCase.testMain(LayoutEngineTestSuite.java:219)
[junit] at org.apache.fop.layoutengine.LayoutEngineTestSuite$1.runTest(LayoutEngineTestSuite.java:193)
[junit]
[junit]
[junit] Testcase: block_hyphenation_kerning.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1): Caused an ERROR
[junit] Expected XPath expression to evaluate to '-1339', but got '31090' (XPath: //flow/block[1]/lineArea[2]/text[1]/@twsadjust)
[junit] java.lang.RuntimeException: Expected XPath expression to evaluate to '-1339', but got '31090' (XPath: //flow/block[1]/lineArea[2]/text[1]/@twsadjust)
[junit] at org.apache.fop.layoutengine.EvalCheck.doCheck(EvalCheck.java:96)
[junit] at org.apache.fop.layoutengine.EvalCheck.check(EvalCheck.java:70)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.doATChecks(LayoutEngineTester.java:222)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.doATChecks(LayoutEngineTester.java:215)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.checkAll(LayoutEngineTester.java:188)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.runTest(LayoutEngineTester.java:142)
[junit] at org.apache.fop.layoutengine.LayoutEngineTestSuite$LayoutEngineTestCase.testMain(LayoutEngineTestSuite.java:219)
[junit] at org.apache.fop.layoutengine.LayoutEngineTestSuite$1.runTest(LayoutEngineTestSuite.java:193)
[junit]
[junit]
[junit] Testcase: block_uax14_linebreaking_hyph.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1): Caused an ERROR
[junit] Expected XPath expression to evaluate to '9', but got '4' (XPath: count(//flow/block/lineArea))
[junit] java.lang.RuntimeException: Expected XPath expression to evaluate to '9', but got '4' (XPath: count(//flow/block/lineArea))
[junit] at org.apache.fop.layoutengine.EvalCheck.doCheck(EvalCheck.java:96)
[junit] at org.apache.fop.layoutengine.EvalCheck.check(EvalCheck.java:70)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.doATChecks(LayoutEngineTester.java:222)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.doATChecks(LayoutEngineTester.java:215)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.checkAll(LayoutEngineTester.java:188)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.runTest(LayoutEngineTester.java:142)
[junit] at org.apache.fop.layoutengine.LayoutEngineTestSuite$LayoutEngineTestCase.testMain(LayoutEngineTestSuite.java:219)
[junit] at org.apache.fop.layoutengine.LayoutEngineTestSuite$1.runTest(LayoutEngineTestSuite.java:193)
[junit]
[junit]
[junit] Testcase: inline_border_padding_hyphenate_de.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1): Caused an ERROR
[junit] Expected XPath expression to evaluate to '250110', but got '377390' (XPath: //flow/block[1]/lineArea[1]/inlineparent/@ipd)
[junit] java.lang.RuntimeException: Expected XPath expression to evaluate to '250110', but got '377390' (XPath: //flow/block[1]/lineArea[1]/inlineparent/@ipd)
[junit] at org.apache.fop.layoutengine.EvalCheck.doCheck(EvalCheck.java:96)
[junit] at org.apache.fop.layoutengine.EvalCheck.check(EvalCheck.java:70)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.doATChecks(LayoutEngineTester.java:222)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.doATChecks(LayoutEngineTester.java:215)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.checkAll(LayoutEngineTester.java:188)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.runTest(LayoutEngineTester.java:142)
[junit] at org.apache.fop.layoutengine.LayoutEngineTestSuite$LayoutEngineTestCase.testMain(LayoutEngineTestSuite.java:219)
[junit] at org.apache.fop.layoutengine.LayoutEngineTestSuite$1.runTest(LayoutEngineTestSuite.java:193)
[junit]
[junit]
[junit] Testcase: block_hyphenation-ladder-count.xml(org.apache.fop.layoutengine.LayoutEngineTestSuite$1): Caused an ERROR
[junit] Expected XPath expression to evaluate to '8', but got '9' (XPath: count(//pageViewport[1]//flow/block[2]/lineArea))
[junit] java.lang.RuntimeException: Expected XPath expression to evaluate to '8', but got '9' (XPath: count(//pageViewport[1]//flow/block[2]/lineArea))
[junit] at org.apache.fop.layoutengine.EvalCheck.doCheck(EvalCheck.java:96)
[junit] at org.apache.fop.layoutengine.EvalCheck.check(EvalCheck.java:70)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.doATChecks(LayoutEngineTester.java:222)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.doATChecks(LayoutEngineTester.java:215)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.checkAll(LayoutEngineTester.java:188)
[junit] at org.apache.fop.layoutengine.LayoutEngineTester.runTest(LayoutEngineTester.java:142)
[junit] at org.apache.fop.layoutengine.LayoutEngineTestSuite$LayoutEngineTestCase.testMain(LayoutEngineTestSuite.java:219)
[junit] at org.apache.fop.layoutengine.LayoutEngineTestSuite$1.runTest(LayoutEngineTestSuite.java:193)
[junit]
[junit]
BUILD SUCCESSFUL
Total time: 8 seconds
signature.asc
Description: This is a digitally signed message part
