aboutsummaryrefslogtreecommitdiffstats
path: root/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'test/java')
-rw-r--r--test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java16
-rw-r--r--test/java/org/apache/fop/AbstractFOPTestCase.java6
-rw-r--r--test/java/org/apache/fop/BasicDriverTestCase.java24
-rw-r--r--test/java/org/apache/fop/BasicDriverTestSuite.java6
-rw-r--r--test/java/org/apache/fop/BasicPDFTranscoderTestCase.java8
-rw-r--r--test/java/org/apache/fop/BasicPSTranscoderTestCase.java8
-rw-r--r--test/java/org/apache/fop/BasicTranscoderTestSuite.java6
-rw-r--r--test/java/org/apache/fop/DebugHelper.java6
-rw-r--r--test/java/org/apache/fop/DigestFilterTestCase.java4
-rw-r--r--test/java/org/apache/fop/GenericFOPTestCase.java8
-rw-r--r--test/java/org/apache/fop/KnuthAlgorithmTestCase.java20
-rw-r--r--test/java/org/apache/fop/StandardTestSuite.java6
-rw-r--r--test/java/org/apache/fop/URIResolutionTestCase.java54
-rw-r--r--test/java/org/apache/fop/UtilityCodeTestSuite.java6
-rw-r--r--test/java/org/apache/fop/config/BaseConstructiveUserConfigTestCase.java4
-rw-r--r--test/java/org/apache/fop/config/BaseDestructiveUserConfigTestCase.java4
-rw-r--r--test/java/org/apache/fop/config/BaseUserConfigTestCase.java4
-rw-r--r--test/java/org/apache/fop/config/FontAttributesMissingTestCase.java4
-rw-r--r--test/java/org/apache/fop/config/FontBaseBadTestCase.java6
-rw-r--r--test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java4
-rw-r--r--test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java6
-rw-r--r--test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java6
-rw-r--r--test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java6
-rw-r--r--test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java6
-rw-r--r--test/java/org/apache/fop/config/FontsAutoDetectTestCase.java4
-rw-r--r--test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java10
-rw-r--r--test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java8
-rw-r--r--test/java/org/apache/fop/config/UserConfigTestSuite.java4
-rw-r--r--test/java/org/apache/fop/datatypes/URISpecificationTestCase.java8
-rw-r--r--test/java/org/apache/fop/events/BasicEventTestCase.java20
-rw-r--r--test/java/org/apache/fop/events/TestEventProducer.java8
-rw-r--r--test/java/org/apache/fop/fo/flow/table/AbstractTableTestCase.java6
-rw-r--r--test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java4
-rw-r--r--test/java/org/apache/fop/fo/flow/table/ErrorCheckTestCase.java4
-rw-r--r--test/java/org/apache/fop/fo/flow/table/IllegalRowSpanTestCase.java4
-rw-r--r--test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java8
-rw-r--r--test/java/org/apache/fop/fo/flow/table/TableColumnColumnNumberTestCase.java6
-rw-r--r--test/java/org/apache/fop/fo/flow/table/TooManyColumnsTestCase.java4
-rw-r--r--test/java/org/apache/fop/fonts/TrueTypeAnsiTestCase.java20
-rw-r--r--test/java/org/apache/fop/fotreetest/FOTreeTestSuite.java24
-rw-r--r--test/java/org/apache/fop/fotreetest/FOTreeTester.java22
-rw-r--r--test/java/org/apache/fop/fotreetest/FOTreeUnitTester.java6
-rw-r--r--test/java/org/apache/fop/fotreetest/ResultCollector.java14
-rw-r--r--test/java/org/apache/fop/fotreetest/ext/AssertElement.java24
-rw-r--r--test/java/org/apache/fop/fotreetest/ext/TestElementMapping.java8
-rw-r--r--test/java/org/apache/fop/fotreetest/ext/TestObj.java6
-rw-r--r--test/java/org/apache/fop/image/loader/batik/ImageLoaderTestCase.java26
-rw-r--r--test/java/org/apache/fop/image/loader/batik/ImagePreloaderTestCase.java30
-rw-r--r--test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java52
-rw-r--r--test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java8
-rw-r--r--test/java/org/apache/fop/layoutengine/ElementListCheck.java62
-rw-r--r--test/java/org/apache/fop/layoutengine/ElementListCollector.java18
-rw-r--r--test/java/org/apache/fop/layoutengine/EvalCheck.java10
-rw-r--r--test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java2
-rw-r--r--test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java36
-rw-r--r--test/java/org/apache/fop/layoutengine/LayoutResult.java8
-rw-r--r--test/java/org/apache/fop/layoutengine/ResultCheck.java8
-rw-r--r--test/java/org/apache/fop/layoutengine/TrueCheck.java10
-rw-r--r--test/java/org/apache/fop/memory/MemoryEater.java34
-rw-r--r--test/java/org/apache/fop/pdf/PDFObjectTestCase.java10
-rw-r--r--test/java/org/apache/fop/render/pdf/BasePDFTestCase.java2
-rw-r--r--test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java14
-rw-r--r--test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java10
-rw-r--r--test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java24
-rw-r--r--test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/Bug39607TestCase.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java6
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/DummyTableColumnsInfo.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/ListInTable.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleDocument.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleLists.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/TextAttributes.java4
-rw-r--r--test/java/org/apache/fop/render/rtf/rtflib/testdocs/Whitespace.java4
-rw-r--r--test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java118
-rw-r--r--test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java8
-rw-r--r--test/java/org/apache/fop/threading/FOPTestbed.java24
-rw-r--r--test/java/org/apache/fop/threading/FOProcessor.java4
-rw-r--r--test/java/org/apache/fop/threading/FOProcessorImpl.java6
-rw-r--r--test/java/org/apache/fop/threading/Main.java14
-rw-r--r--test/java/org/apache/fop/traits/BorderPropsTestCase.java8
-rw-r--r--test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java32
-rw-r--r--test/java/org/apache/fop/util/ColorUtilTestCase.java32
-rw-r--r--test/java/org/apache/fop/util/ConsoleEventListenerForTests.java4
-rw-r--r--test/java/org/apache/fop/util/DataURIResolverTestCase.java14
-rw-r--r--test/java/org/apache/fop/util/DigestFilter.java6
-rw-r--r--test/java/org/apache/fop/util/ElementListUtilsTestCase.java28
-rw-r--r--test/java/org/apache/fop/util/PDFNumberTestCase.java14
-rw-r--r--test/java/org/apache/fop/util/UnitConvTestCase.java4
-rw-r--r--test/java/org/apache/fop/util/XMLResourceBundleTestCase.java6
-rw-r--r--test/java/org/apache/fop/visual/AbstractBitmapProducer.java6
-rw-r--r--test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java30
-rw-r--r--test/java/org/apache/fop/visual/AbstractRedirectorLineHandler.java2
-rw-r--r--test/java/org/apache/fop/visual/BatchDiffer.java30
-rw-r--r--test/java/org/apache/fop/visual/BitmapComparator.java26
-rw-r--r--test/java/org/apache/fop/visual/BitmapProducer.java2
-rw-r--r--test/java/org/apache/fop/visual/BitmapProducerJava2D.java8
-rw-r--r--test/java/org/apache/fop/visual/BitmapProducerPDF.java6
-rw-r--r--test/java/org/apache/fop/visual/BitmapProducerPS.java6
-rw-r--r--test/java/org/apache/fop/visual/ConvertUtils.java18
-rw-r--r--test/java/org/apache/fop/visual/ProducerContext.java8
-rw-r--r--test/java/org/apache/fop/visual/RedirectorLineHandler.java2
-rw-r--r--test/java/org/apache/fop/visual/ReferenceBitmapLoader.java2
-rw-r--r--test/java/org/apache/fop/visual/StreamRedirector.java4
111 files changed, 678 insertions, 678 deletions
diff --git a/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java b/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java
index a198518ac..4a65b77b5 100644
--- a/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java
+++ b/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop;
import java.io.File;
@@ -28,7 +28,7 @@ import org.apache.batik.transcoder.TranscoderOutput;
import org.apache.commons.io.output.ByteArrayOutputStream;
/**
- * Basic runtime test for FOP's transcoders. It is used to verify that
+ * Basic runtime test for FOP's transcoders. It is used to verify that
* nothing obvious is broken after compiling.
*/
public abstract class AbstractBasicTranscoderTestCase extends AbstractFOPTestCase {
@@ -47,25 +47,25 @@ public abstract class AbstractBasicTranscoderTestCase extends AbstractFOPTestCas
protected abstract Transcoder createTranscoder();
/**
- * Runs the PDF transcoder as if it were called by Batik's rasterizer.
+ * Runs the PDF transcoder as if it were called by Batik's rasterizer.
* Without special configuration stuff.
* @throws Exception if a problem occurs
*/
public void testGenericPDFTranscoder() throws Exception {
//Create transcoder
Transcoder transcoder = createTranscoder();
-
+
//Setup input
File svgFile = new File(getBaseDir(), "test/resources/fop/svg/text.svg");
InputStream in = new java.io.FileInputStream(svgFile);
try {
TranscoderInput input = new TranscoderInput(in);
-
+
//Setup output
ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
TranscoderOutput output = new TranscoderOutput(out);
-
+
//Do the transformation
transcoder.transcode(input, output);
} finally {
diff --git a/test/java/org/apache/fop/AbstractFOPTestCase.java b/test/java/org/apache/fop/AbstractFOPTestCase.java
index 3df52fc4c..7d6fee984 100644
--- a/test/java/org/apache/fop/AbstractFOPTestCase.java
+++ b/test/java/org/apache/fop/AbstractFOPTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop;
import java.io.File;
diff --git a/test/java/org/apache/fop/BasicDriverTestCase.java b/test/java/org/apache/fop/BasicDriverTestCase.java
index 34f1002e0..0ae6da048 100644
--- a/test/java/org/apache/fop/BasicDriverTestCase.java
+++ b/test/java/org/apache/fop/BasicDriverTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop;
import java.io.File;
@@ -36,7 +36,7 @@ import org.apache.fop.apps.MimeConstants;
import org.apache.fop.cli.InputHandler;
/**
- * Basic runtime test for the old Fop class. It is used to verify that
+ * Basic runtime test for the old Fop class. It is used to verify that
* nothing obvious is broken after compiling.
*/
public class BasicDriverTestCase extends AbstractFOPTestCase {
@@ -59,13 +59,13 @@ public class BasicDriverTestCase extends AbstractFOPTestCase {
File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
ByteArrayOutputStream baout = new ByteArrayOutputStream();
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, foUserAgent, baout);
-
+
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(); //Identity transf.
Source src = new StreamSource(foFile);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
-
+
assertTrue("Generated PDF has zero length", baout.size() > 0);
}
@@ -78,13 +78,13 @@ public class BasicDriverTestCase extends AbstractFOPTestCase {
File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
ByteArrayOutputStream baout = new ByteArrayOutputStream();
Fop fop = fopFactory.newFop(MimeConstants.MIME_POSTSCRIPT, foUserAgent, baout);
-
+
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(); //Identity transf.
Source src = new StreamSource(foFile);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
-
+
assertTrue("Generated PostScript has zero length", baout.size() > 0);
}
@@ -97,13 +97,13 @@ public class BasicDriverTestCase extends AbstractFOPTestCase {
File foFile = new File(getBaseDir(), "test/xml/bugtests/block.fo");
ByteArrayOutputStream baout = new ByteArrayOutputStream();
Fop fop = fopFactory.newFop(MimeConstants.MIME_RTF, foUserAgent, baout);
-
+
TransformerFactory factory = TransformerFactory.newInstance();
Transformer transformer = factory.newTransformer(); //Identity transf.
Source src = new StreamSource(foFile);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
-
+
assertTrue("Generated RTF has zero length", baout.size() > 0);
}
@@ -116,10 +116,10 @@ public class BasicDriverTestCase extends AbstractFOPTestCase {
File xmlFile = new File(getBaseDir(), "test/xml/1.xml");
File xsltFile = new File(getBaseDir(), "test/xsl/doc.xsl");
ByteArrayOutputStream baout = new ByteArrayOutputStream();
-
+
InputHandler handler = new InputHandler(xmlFile, xsltFile, null);
handler.renderTo(foUserAgent, MimeConstants.MIME_PDF, baout);
-
+
assertTrue("Generated PDF has zero length", baout.size() > 0);
}
diff --git a/test/java/org/apache/fop/BasicDriverTestSuite.java b/test/java/org/apache/fop/BasicDriverTestSuite.java
index 62bd262a8..92fb07a8d 100644
--- a/test/java/org/apache/fop/BasicDriverTestSuite.java
+++ b/test/java/org/apache/fop/BasicDriverTestSuite.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop;
import junit.framework.Test;
diff --git a/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java b/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java
index 9dba9abdf..44668d004 100644
--- a/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java
+++ b/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,14 +16,14 @@
*/
/* $Id$ */
-
+
package org.apache.fop;
import org.apache.batik.transcoder.Transcoder;
import org.apache.fop.svg.PDFTranscoder;
/**
- * Basic runtime test for the PDF transcoder. It is used to verify that
+ * Basic runtime test for the PDF transcoder. It is used to verify that
* nothing obvious is broken after compiling.
*/
public class BasicPDFTranscoderTestCase extends AbstractBasicTranscoderTestCase {
diff --git a/test/java/org/apache/fop/BasicPSTranscoderTestCase.java b/test/java/org/apache/fop/BasicPSTranscoderTestCase.java
index c66b31874..69be94b60 100644
--- a/test/java/org/apache/fop/BasicPSTranscoderTestCase.java
+++ b/test/java/org/apache/fop/BasicPSTranscoderTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,14 +16,14 @@
*/
/* $Id$ */
-
+
package org.apache.fop;
import org.apache.batik.transcoder.Transcoder;
import org.apache.fop.render.ps.PSTranscoder;
/**
- * Basic runtime test for the PS transcoder. It is used to verify that
+ * Basic runtime test for the PS transcoder. It is used to verify that
* nothing obvious is broken after compiling.
*/
public class BasicPSTranscoderTestCase extends AbstractBasicTranscoderTestCase {
diff --git a/test/java/org/apache/fop/BasicTranscoderTestSuite.java b/test/java/org/apache/fop/BasicTranscoderTestSuite.java
index 8c0103cdc..ed70afd82 100644
--- a/test/java/org/apache/fop/BasicTranscoderTestSuite.java
+++ b/test/java/org/apache/fop/BasicTranscoderTestSuite.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop;
import junit.framework.Test;
diff --git a/test/java/org/apache/fop/DebugHelper.java b/test/java/org/apache/fop/DebugHelper.java
index ee51b07b6..6705d2f56 100644
--- a/test/java/org/apache/fop/DebugHelper.java
+++ b/test/java/org/apache/fop/DebugHelper.java
@@ -28,9 +28,9 @@ import org.apache.fop.logging.LoggingElementListObserver;
public class DebugHelper {
private static boolean elObserversRegistered = false;
-
+
/**
- * Registers the default element list observers used for debugging.
+ * Registers the default element list observers used for debugging.
*/
public static void registerStandardElementListObservers() {
if (!elObserversRegistered) {
@@ -38,5 +38,5 @@ public class DebugHelper {
elObserversRegistered = true;
}
}
-
+
}
diff --git a/test/java/org/apache/fop/DigestFilterTestCase.java b/test/java/org/apache/fop/DigestFilterTestCase.java
index b2296c49a..47fa34839 100644
--- a/test/java/org/apache/fop/DigestFilterTestCase.java
+++ b/test/java/org/apache/fop/DigestFilterTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/GenericFOPTestCase.java b/test/java/org/apache/fop/GenericFOPTestCase.java
index f09ae2611..26053cdad 100644
--- a/test/java/org/apache/fop/GenericFOPTestCase.java
+++ b/test/java/org/apache/fop/GenericFOPTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -44,13 +44,13 @@ import org.xml.sax.InputSource;
* a MD5 for the source to help diferentiating failures caused by causal
* source modification from failures caused by regression, a renderer (only
* PDF currently supported) and a MD5 for the result.
- *
+ *
*/
public final class GenericFOPTestCase extends TestCase {
// configure fopFactory as desired
private FopFactory fopFactory = FopFactory.newInstance();
-
+
protected SAXParserFactory parserFactory;
public static Test suite() {
diff --git a/test/java/org/apache/fop/KnuthAlgorithmTestCase.java b/test/java/org/apache/fop/KnuthAlgorithmTestCase.java
index 44c8d1961..5a5523642 100644
--- a/test/java/org/apache/fop/KnuthAlgorithmTestCase.java
+++ b/test/java/org/apache/fop/KnuthAlgorithmTestCase.java
@@ -54,14 +54,14 @@ public class KnuthAlgorithmTestCase extends TestCase {
seq.add(new KnuthGlue(-5000, 0, 0, null, true));
}
}
-
+
seq.add(new KnuthPenalty(0, KnuthPenalty.INFINITE, false, null, false));
seq.add(new KnuthGlue(0, Integer.MAX_VALUE, 0, null, false));
seq.add(new KnuthPenalty(0, -KnuthPenalty.INFINITE, false, null, false));
ElementListObserver.observe(seq, "test", null);
return seq;
}
-
+
/**
* Tests a special condition where a negative-length glue occurs directly after a break
* possibility.
@@ -77,18 +77,18 @@ public class KnuthAlgorithmTestCase extends TestCase {
assertEquals(5000, parts[0].difference);
assertEquals(5000, parts[1].difference);
}
-
+
private class Part {
private int difference;
private double ratio;
private int position;
}
-
+
private class MyBreakingAlgorithm extends BreakingAlgorithm {
private List parts = new java.util.ArrayList();
-
- public MyBreakingAlgorithm(int align, int alignLast, boolean first,
+
+ public MyBreakingAlgorithm(int align, int alignLast, boolean first,
boolean partOverflowRecovery, int maxFlagCount) {
super(align, alignLast, first, partOverflowRecovery, maxFlagCount);
}
@@ -96,7 +96,7 @@ public class KnuthAlgorithmTestCase extends TestCase {
public Part[] getParts() {
return (Part[])parts.toArray(new Part[parts.size()]);
}
-
+
public void updateData1(int total, double demerits) {
//nop
}
@@ -111,7 +111,7 @@ public class KnuthAlgorithmTestCase extends TestCase {
// spaces always have enough shrink
difference = 0;
} else if (ratio <= 1 && bestActiveNode.line < total) {
- // not-last page break with a positive difference smaller than the available
+ // not-last page break with a positive difference smaller than the available
// stretch: spaces can stretch to fill the whole difference
difference = 0;
} else if (ratio > 1) {
@@ -138,7 +138,7 @@ public class KnuthAlgorithmTestCase extends TestCase {
//nop
return 0;
}
-
+
}
-
+
}
diff --git a/test/java/org/apache/fop/StandardTestSuite.java b/test/java/org/apache/fop/StandardTestSuite.java
index 6399d3b09..c20683912 100644
--- a/test/java/org/apache/fop/StandardTestSuite.java
+++ b/test/java/org/apache/fop/StandardTestSuite.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop;
import junit.framework.Test;
diff --git a/test/java/org/apache/fop/URIResolutionTestCase.java b/test/java/org/apache/fop/URIResolutionTestCase.java
index 106ec0a2c..8b8b42ad6 100644
--- a/test/java/org/apache/fop/URIResolutionTestCase.java
+++ b/test/java/org/apache/fop/URIResolutionTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop;
import java.io.File;
@@ -57,12 +57,12 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
// configure fopFactory as desired
private FopFactory fopFactory = FopFactory.newInstance();
-
- private SAXTransformerFactory tfactory
+
+ private SAXTransformerFactory tfactory
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();
private File backupDir = new File(getBaseDir(), "build/test-results");
-
+
/** @see junit.framework.TestCase#TestCase(String) */
public URIResolutionTestCase(String name) {
super(name);
@@ -75,7 +75,7 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
public void testFO1a() throws Exception {
innerTestFO1(false);
}
-
+
/**
* Test custom URI resolution with a hand-written URIResolver.
* @throws Exception if anything fails
@@ -83,25 +83,25 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
public void testFO1b() throws Exception {
innerTestFO1(true);
}
-
+
private void innerTestFO1(boolean withStream) throws Exception {
FOUserAgent ua = fopFactory.newFOUserAgent();
File foFile = new File(getBaseDir(), "test/xml/uri-resolution1.fo");
-
- MyURIResolver resolver = new MyURIResolver(withStream);
+
+ MyURIResolver resolver = new MyURIResolver(withStream);
ua.setURIResolver(resolver);
ua.setBaseURL(foFile.getParentFile().toURL().toString());
Document doc = createAreaTree(foFile, ua);
-
+
//Check how many times the resolver was consulted
assertEquals("Expected resolver to do 1 successful URI resolution",
1, resolver.successCount);
assertEquals("Expected resolver to do 0 failed URI resolution",
0, resolver.failureCount);
//Additional XPath checking on the area tree
- assertEquals("viewport for external-graphic is missing",
+ assertEquals("viewport for external-graphic is missing",
"true", evalXPath(doc, "boolean(//flow/block[1]/lineArea/viewport)"));
assertEquals("46080", evalXPath(doc, "//flow/block[1]/lineArea/viewport/@ipd"));
assertEquals("46080", evalXPath(doc, "//flow/block[1]/lineArea/viewport/@bpd"));
@@ -114,9 +114,9 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
public void DISABLEDtestFO2() throws Exception {
//TODO This will only work when we can do URI resolution inside Batik!
File foFile = new File(getBaseDir(), "test/xml/uri-resolution2.fo");
-
+
FOUserAgent ua = fopFactory.newFOUserAgent();
- MyURIResolver resolver = new MyURIResolver(false);
+ MyURIResolver resolver = new MyURIResolver(false);
ua.setURIResolver(resolver);
ua.setBaseURL(foFile.getParentFile().toURL().toString());
@@ -128,7 +128,7 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
Source src = new StreamSource(foFile);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
-
+
OutputStream out = new java.io.FileOutputStream(
new File(backupDir, foFile.getName() + ".pdf"));
try {
@@ -136,7 +136,7 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
} finally {
IOUtils.closeQuietly(out);
}
-
+
//Check how many times the resolver was consulted
assertEquals("Expected resolver to do 1 successful URI resolution",
1, resolver.successCount);
@@ -147,7 +147,7 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
assertTrue("Generated PDF has zero length", baout.size() > 0);
}
- private Document createAreaTree(File fo, FOUserAgent ua)
+ private Document createAreaTree(File fo, FOUserAgent ua)
throws TransformerException, FOPException {
DOMResult domres = new DOMResult();
//Setup Transformer to convert the area tree to a DOM
@@ -158,19 +158,19 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
atrenderer.setUserAgent(ua);
atrenderer.setContentHandler(athandler);
ua.setRendererOverride(atrenderer);
-
+
Fop fop = fopFactory.newFop(ua);
Transformer transformer = tfactory.newTransformer(); //Identity transf.
Source src = new StreamSource(fo);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
-
+
Document doc = (Document)domres.getNode();
saveAreaTreeXML(doc, new File(backupDir, fo.getName() + ".at.xml"));
return doc;
}
-
+
private String evalXPath(Document doc, String xpath) {
XObject res;
try {
@@ -193,19 +193,19 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
Result res = new StreamResult(target);
transformer.transform(src, res);
}
-
+
private class MyURIResolver implements URIResolver {
private static final String PREFIX = "funky:";
-
- private boolean withStream;
+
+ private boolean withStream;
private int successCount = 0;
private int failureCount = 0;
-
+
public MyURIResolver(boolean withStream) {
this.withStream = withStream;
}
-
+
/**
* @see javax.xml.transform.URIResolver#resolve(java.lang.String, java.lang.String)
*/
@@ -235,7 +235,7 @@ public class URIResolutionTestCase extends AbstractFOPTestCase {
return null;
}
}
-
+
}
-
+
}
diff --git a/test/java/org/apache/fop/UtilityCodeTestSuite.java b/test/java/org/apache/fop/UtilityCodeTestSuite.java
index d2577c251..af467102c 100644
--- a/test/java/org/apache/fop/UtilityCodeTestSuite.java
+++ b/test/java/org/apache/fop/UtilityCodeTestSuite.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop;
import junit.framework.Test;
diff --git a/test/java/org/apache/fop/config/BaseConstructiveUserConfigTestCase.java b/test/java/org/apache/fop/config/BaseConstructiveUserConfigTestCase.java
index cd1c26f8c..b94c47373 100644
--- a/test/java/org/apache/fop/config/BaseConstructiveUserConfigTestCase.java
+++ b/test/java/org/apache/fop/config/BaseConstructiveUserConfigTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/config/BaseDestructiveUserConfigTestCase.java b/test/java/org/apache/fop/config/BaseDestructiveUserConfigTestCase.java
index c02f99c03..0d294d328 100644
--- a/test/java/org/apache/fop/config/BaseDestructiveUserConfigTestCase.java
+++ b/test/java/org/apache/fop/config/BaseDestructiveUserConfigTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/config/BaseUserConfigTestCase.java b/test/java/org/apache/fop/config/BaseUserConfigTestCase.java
index ff14e5f0b..4a450a788 100644
--- a/test/java/org/apache/fop/config/BaseUserConfigTestCase.java
+++ b/test/java/org/apache/fop/config/BaseUserConfigTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java b/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java
index a6333009d..00e9b181b 100644
--- a/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java
+++ b/test/java/org/apache/fop/config/FontAttributesMissingTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/config/FontBaseBadTestCase.java b/test/java/org/apache/fop/config/FontBaseBadTestCase.java
index af9031199..b22d0f4f3 100644
--- a/test/java/org/apache/fop/config/FontBaseBadTestCase.java
+++ b/test/java/org/apache/fop/config/FontBaseBadTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -21,7 +21,7 @@ package org.apache.fop.config;
/*
* this font base does not exist and a relative font path is used
- */
+ */
public class FontBaseBadTestCase extends BaseDestructiveUserConfigTestCase {
public FontBaseBadTestCase(String name) {
diff --git a/test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java b/test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java
index 218cee795..aa8b9e000 100644
--- a/test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java
+++ b/test/java/org/apache/fop/config/FontEmbedUrlBadTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java b/test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java
index e87164e90..6d41b0a13 100644
--- a/test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java
+++ b/test/java/org/apache/fop/config/FontEmbedUrlMalformedTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -19,7 +19,7 @@
package org.apache.fop.config;
-/**
+/**
* this font has a malformed embed-url
*/
public class FontEmbedUrlMalformedTestCase extends BaseDestructiveUserConfigTestCase {
diff --git a/test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java b/test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java
index 00c4db752..166274452 100644
--- a/test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java
+++ b/test/java/org/apache/fop/config/FontMetricsUrlBadTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -21,7 +21,7 @@ package org.apache.fop.config;
/*
* this font has a metrics-url that does not exist on filesystem
- */
+ */
public class FontMetricsUrlBadTestCase extends BaseDestructiveUserConfigTestCase {
/**
diff --git a/test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java b/test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java
index d5815b42f..ae4dde886 100644
--- a/test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java
+++ b/test/java/org/apache/fop/config/FontMetricsUrlMalformedTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -21,7 +21,7 @@ package org.apache.fop.config;
/*
* this font has a malformed metrics-url
- */
+ */
public class FontMetricsUrlMalformedTestCase extends BaseDestructiveUserConfigTestCase {
public FontMetricsUrlMalformedTestCase(String name) {
diff --git a/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java b/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java
index aed07ed48..dcc0098be 100644
--- a/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java
+++ b/test/java/org/apache/fop/config/FontTripletAttributeMissingTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -21,7 +21,7 @@ package org.apache.fop.config;
/*
* this font has a missing font triplet attribute
- */
+ */
public class FontTripletAttributeMissingTestCase extends BaseDestructiveUserConfigTestCase {
public FontTripletAttributeMissingTestCase(String name) {
diff --git a/test/java/org/apache/fop/config/FontsAutoDetectTestCase.java b/test/java/org/apache/fop/config/FontsAutoDetectTestCase.java
index 3e188a3e9..403bf3282 100644
--- a/test/java/org/apache/fop/config/FontsAutoDetectTestCase.java
+++ b/test/java/org/apache/fop/config/FontsAutoDetectTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java b/test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java
index b439e37b2..e83e5ca04 100644
--- a/test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java
+++ b/test/java/org/apache/fop/config/FontsDirectoryBadTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -21,20 +21,20 @@ package org.apache.fop.config;
/*
* this font has a metrics-url that does not exist on filesystem
- */
+ */
public class FontsDirectoryBadTestCase extends BaseDestructiveUserConfigTestCase {
public FontsDirectoryBadTestCase(String name) {
super(name);
}
-
+
/**
* @see org.apache.fop.config.BaseUserConfigTestCase#getUserConfigFilename()
*/
public String getUserConfigFilename() {
return "test_fonts_directory_bad.xconf";
}
-
+
/** get test FOP config File */
protected String getFontFOFilePath() {
return "test/xml/bugtests/font-dir.fo";
diff --git a/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java b/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java
index 1759f532d..3c0205d3d 100644
--- a/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java
+++ b/test/java/org/apache/fop/config/FontsDirectoryRecursiveTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -20,7 +20,7 @@
package org.apache.fop.config;
/**
- * tests font directory on system
+ * tests font directory on system
*/
public class FontsDirectoryRecursiveTestCase extends BaseConstructiveUserConfigTestCase {
@@ -33,5 +33,5 @@ public class FontsDirectoryRecursiveTestCase extends BaseConstructiveUserConfigT
*/
protected String getUserConfigFilename() {
return "test_fonts_directory_recursive.xconf";
- }
+ }
}
diff --git a/test/java/org/apache/fop/config/UserConfigTestSuite.java b/test/java/org/apache/fop/config/UserConfigTestSuite.java
index c12180625..f933a0342 100644
--- a/test/java/org/apache/fop/config/UserConfigTestSuite.java
+++ b/test/java/org/apache/fop/config/UserConfigTestSuite.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/datatypes/URISpecificationTestCase.java b/test/java/org/apache/fop/datatypes/URISpecificationTestCase.java
index 4f6f24f95..45470aeee 100644
--- a/test/java/org/apache/fop/datatypes/URISpecificationTestCase.java
+++ b/test/java/org/apache/fop/datatypes/URISpecificationTestCase.java
@@ -28,7 +28,7 @@ public class URISpecificationTestCase extends TestCase {
public void testGetURL() throws Exception {
String actual;
-
+
actual = URISpecification.getURL("http://localhost/test");
assertEquals("http://localhost/test", actual);
@@ -41,10 +41,10 @@ public class URISpecificationTestCase extends TestCase {
actual = URISpecification.getURL("url(\"http://localhost/test\")");
assertEquals("http://localhost/test", actual);
}
-
+
public void testEscapeURI() throws Exception {
String actual;
-
+
actual = URISpecification.escapeURI("http://localhost/test");
assertEquals("http://localhost/test", actual);
@@ -57,5 +57,5 @@ public class URISpecificationTestCase extends TestCase {
actual = URISpecification.escapeURI("http://localhost/test test.pdf#page=6");
assertEquals("http://localhost/test%20test.pdf#page=6", actual);
}
-
+
}
diff --git a/test/java/org/apache/fop/events/BasicEventTestCase.java b/test/java/org/apache/fop/events/BasicEventTestCase.java
index d365ca0ec..c69dad081 100644
--- a/test/java/org/apache/fop/events/BasicEventTestCase.java
+++ b/test/java/org/apache/fop/events/BasicEventTestCase.java
@@ -26,27 +26,27 @@ import org.apache.fop.events.model.EventSeverity;
public class BasicEventTestCase extends TestCase {
public void testBasics() throws Exception {
-
+
MyEventListener listener = new MyEventListener();
EventBroadcaster broadcaster = new DefaultEventBroadcaster();
broadcaster.addEventListener(listener);
assertTrue(broadcaster.hasEventListeners());
-
+
Event ev = new Event(this, "123", EventSeverity.INFO,
Event.paramsBuilder()
.param("reason", "I'm tired")
.param("blah", new Integer(23))
.build());
broadcaster.broadcastEvent(ev);
-
+
ev = listener.event;
assertNotNull(ev);
assertEquals("123", listener.event.getEventID());
assertEquals(EventSeverity.INFO, listener.event.getSeverity());
assertEquals("I'm tired", ev.getParam("reason"));
assertEquals(new Integer(23), ev.getParam("blah"));
-
+
broadcaster.removeEventListener(listener);
assertFalse(broadcaster.hasEventListeners());
@@ -60,11 +60,11 @@ public class BasicEventTestCase extends TestCase {
EventBroadcaster broadcaster = new DefaultEventBroadcaster();
broadcaster.addEventListener(listener);
assertTrue(broadcaster.hasEventListeners());
-
-
+
+
TestEventProducer producer = TestEventProducer.Provider.get(broadcaster);
producer.complain(this, "I'm tired", 23);
-
+
Event ev = listener.event;
assertNotNull(ev);
assertEquals("org.apache.fop.events.TestEventProducer.complain",
@@ -72,18 +72,18 @@ public class BasicEventTestCase extends TestCase {
assertEquals(EventSeverity.WARN, listener.event.getSeverity());
assertEquals("I'm tired", ev.getParam("reason"));
assertEquals(new Integer(23), ev.getParam("blah"));
-
+
broadcaster.removeEventListener(listener);
assertFalse(broadcaster.hasEventListeners());
//Just check that there are no NPEs
broadcaster.broadcastEvent(ev);
}
-
+
private class MyEventListener implements EventListener {
private Event event;
-
+
public void processEvent(Event event) {
if (this.event != null) {
fail("Multiple events received");
diff --git a/test/java/org/apache/fop/events/TestEventProducer.java b/test/java/org/apache/fop/events/TestEventProducer.java
index 7dfba75ba..ff0bc2a81 100644
--- a/test/java/org/apache/fop/events/TestEventProducer.java
+++ b/test/java/org/apache/fop/events/TestEventProducer.java
@@ -29,7 +29,7 @@ public interface TestEventProducer extends EventProducer {
* @event.severity WARN
*/
void complain(Object source, String reason, int blah);
-
+
/**
* Express joy about something.
* @param source the event source
@@ -37,12 +37,12 @@ public interface TestEventProducer extends EventProducer {
* @event.severity INFO
*/
void enjoy(Object source, String what);
-
+
public class Provider {
-
+
public static TestEventProducer get(EventBroadcaster broadcaster) {
return (TestEventProducer)broadcaster.getEventProducerFor(TestEventProducer.class);
}
}
-
+
}
diff --git a/test/java/org/apache/fop/fo/flow/table/AbstractTableTestCase.java b/test/java/org/apache/fop/fo/flow/table/AbstractTableTestCase.java
index 5885c9fd3..90d89d702 100644
--- a/test/java/org/apache/fop/fo/flow/table/AbstractTableTestCase.java
+++ b/test/java/org/apache/fop/fo/flow/table/AbstractTableTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -38,7 +38,7 @@ abstract class AbstractTableTestCase extends FOTreeUnitTester {
super();
tableHandlerFactory = new FOEventHandlerFactory() {
public FOEventHandler createFOEventHandler(FOUserAgent foUserAgent) {
- tableHandler = new TableHandler(foUserAgent);
+ tableHandler = new TableHandler(foUserAgent);
return tableHandler;
}
};
diff --git a/test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java b/test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java
index d26426513..8bddfd095 100644
--- a/test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java
+++ b/test/java/org/apache/fop/fo/flow/table/CollapsedConditionalBorderTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/fo/flow/table/ErrorCheckTestCase.java b/test/java/org/apache/fop/fo/flow/table/ErrorCheckTestCase.java
index 7327c3324..5dbb66a12 100644
--- a/test/java/org/apache/fop/fo/flow/table/ErrorCheckTestCase.java
+++ b/test/java/org/apache/fop/fo/flow/table/ErrorCheckTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/fo/flow/table/IllegalRowSpanTestCase.java b/test/java/org/apache/fop/fo/flow/table/IllegalRowSpanTestCase.java
index 447b14946..bc3d2b4c8 100644
--- a/test/java/org/apache/fop/fo/flow/table/IllegalRowSpanTestCase.java
+++ b/test/java/org/apache/fop/fo/flow/table/IllegalRowSpanTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java b/test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java
index 498df92b4..6d2c4f85c 100644
--- a/test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java
+++ b/test/java/org/apache/fop/fo/flow/table/RowGroupBuilderTestCase.java
@@ -37,7 +37,7 @@ public class RowGroupBuilderTestCase extends AbstractTableTestCase {
* More precisely, checks that the number of row groups corresponds to the size of the
* given array, and that the number of rows inside each row group is equal to the
* corresponding integer in the array.
- *
+ *
* @param part a table part whose row groups are to be checked
* @param expectedRowLengths expected lengths of all the row groups of this part of
* the table
@@ -123,17 +123,17 @@ public class RowGroupBuilderTestCase extends AbstractTableTestCase {
// Table 2: no header, no footer, one body (1 row-group of 2 rows)
checkNextTableRowGroups(tableIter, null, null, new int[][] {{2}});
- // Table 3: no header, no footer, one body (1 row-group of 2 rows, 1 row)
+ // Table 3: no header, no footer, one body (1 row-group of 2 rows, 1 row)
checkNextTableRowGroups(tableIter, null, null, new int[][] {{2, 1}});
// Table 4: no header, no footer, one body (1 row, 1 row-group of 2 rows)
checkNextTableRowGroups(tableIter, null, null, new int[][] {{1, 2}});
- // Table 5: no header, no footer, one body (1 row, 1 row-group of 3 rows, 1 row)
+ // Table 5: no header, no footer, one body (1 row, 1 row-group of 3 rows, 1 row)
checkNextTableRowGroups(tableIter, null, null, new int[][] {{1, 3, 1}});
// Table 6: one header (1 row-group of 2 rows), one footer (1 row, 1 row-group of 3 rows),
- // one body (1 row-group of 2 rows, 1 row, 1 row-group of 3 rows)
+ // one body (1 row-group of 2 rows, 1 row, 1 row-group of 3 rows)
checkNextTableRowGroups(tableIter, new int[] {2}, new int[] {1, 3}, new int[][] {{2, 1, 3}});
}
diff --git a/test/java/org/apache/fop/fo/flow/table/TableColumnColumnNumberTestCase.java b/test/java/org/apache/fop/fo/flow/table/TableColumnColumnNumberTestCase.java
index 38274ef5e..dc61b1dc2 100644
--- a/test/java/org/apache/fop/fo/flow/table/TableColumnColumnNumberTestCase.java
+++ b/test/java/org/apache/fop/fo/flow/table/TableColumnColumnNumberTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -53,7 +53,7 @@ public class TableColumnColumnNumberTestCase extends AbstractTableTestCase {
private void checkColumn(Table t, int number, boolean isImplicit, int spans, int repeated, int width) {
TableColumn c = t.getColumn(number - 1);
- // TODO a repeated column has a correct number only for its first occurrence
+ // TODO a repeated column has a correct number only for its first occurrence
// assertEquals(number, c.getColumnNumber());
assertEquals(isImplicit, c.isImplicitColumn());
assertEquals(spans, c.getNumberColumnsSpanned());
diff --git a/test/java/org/apache/fop/fo/flow/table/TooManyColumnsTestCase.java b/test/java/org/apache/fop/fo/flow/table/TooManyColumnsTestCase.java
index c02f634cd..0c7effd5b 100644
--- a/test/java/org/apache/fop/fo/flow/table/TooManyColumnsTestCase.java
+++ b/test/java/org/apache/fop/fo/flow/table/TooManyColumnsTestCase.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/fonts/TrueTypeAnsiTestCase.java b/test/java/org/apache/fop/fonts/TrueTypeAnsiTestCase.java
index dc9890167..3f98c93f4 100644
--- a/test/java/org/apache/fop/fonts/TrueTypeAnsiTestCase.java
+++ b/test/java/org/apache/fop/fonts/TrueTypeAnsiTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fonts;
import java.io.File;
@@ -46,7 +46,7 @@ import org.apache.fop.render.pdf.PDFRenderer;
* Tests XML font metrics file generation and usage for WinAnsi mode.
*/
public class TrueTypeAnsiTestCase extends TestCase {
-
+
/**
* Tests a TrueType font in WinAnsi mode.
* @throws Exception if an error occurs
@@ -62,12 +62,12 @@ public class TrueTypeAnsiTestCase extends TestCase {
if (metricsFile.isFile()) {
assertTrue(metricsFile.delete());
}
-
+
String[] args = new String[] {"-enc", "ansi",
ttfFile.getCanonicalPath(), metricsFile.getCanonicalPath()};
TTFReader.main(args);
assertTrue(metricsFile.isFile());
-
+
FopFactory fopFactory = FopFactory.newInstance();
FOUserAgent ua = fopFactory.newFOUserAgent();
PDFRenderer renderer = new PDFRenderer();
@@ -81,12 +81,12 @@ public class TrueTypeAnsiTestCase extends TestCase {
ttfFile.toURI().toASCIIString(), null);
fontList.add(font);
renderer.addFontList(fontList);
-
+
ua.setRendererOverride(renderer);
OutputStream out = new NullOutputStream();
-
+
Fop fop = fopFactory.newFop(null, ua, out);
-
+
TransformerFactory tFactory = TransformerFactory.newInstance();
Source src = new StreamSource(new StringReader(
"<root font-family='" + fontFamily + "'>Test!</root>"));
@@ -103,5 +103,5 @@ public class TrueTypeAnsiTestCase extends TestCase {
}
return new StreamSource(url.toExternalForm());
}
-
+
}
diff --git a/test/java/org/apache/fop/fotreetest/FOTreeTestSuite.java b/test/java/org/apache/fop/fotreetest/FOTreeTestSuite.java
index aa9af4226..76faa21c9 100644
--- a/test/java/org/apache/fop/fotreetest/FOTreeTestSuite.java
+++ b/test/java/org/apache/fop/fotreetest/FOTreeTestSuite.java
@@ -52,11 +52,11 @@ public final class FOTreeTestSuite {
static {
DebugHelper.registerStandardElementListObservers();
}
-
+
private FOTreeTestSuite() {
//don't instantiate!
}
-
+
/**
* @return the test suite with all the tests (one for each XML file)
* @throws IOException in case of an I/O problem
@@ -72,7 +72,7 @@ public final class FOTreeTestSuite {
File mainDir = new File("test/fotree");
final FOTreeTester tester = new FOTreeTester();
-
+
IOFileFilter filter;
String single = System.getProperty("fop.fotree.single");
String startsWith = System.getProperty("fop.fotree.starts-with");
@@ -85,12 +85,12 @@ public final class FOTreeTestSuite {
filter = new SuffixFileFilter(".fo");
filter = LayoutEngineTestSuite.decorateWithDisabledList(filter);
}
- Collection files = FileUtils.listFiles(new File(mainDir, "testcases"),
+ Collection files = FileUtils.listFiles(new File(mainDir, "testcases"),
filter, TrueFileFilter.INSTANCE);
String privateTests = System.getProperty("fop.fotree.private");
if ("true".equalsIgnoreCase(privateTests)) {
Collection privateFiles = FileUtils.listFiles(
- new File(mainDir, "private-testcases"),
+ new File(mainDir, "private-testcases"),
filter, TrueFileFilter.INSTANCE);
files.addAll(privateFiles);
}
@@ -100,8 +100,8 @@ public final class FOTreeTestSuite {
addTestCase(suite, tester, f);
}
}
-
- private static void addTestCase(TestSuite suite,
+
+ private static void addTestCase(TestSuite suite,
final FOTreeTester tester, final File f) {
suite.addTest(new FOTreeTestCase(f.getName()) {
public void runTest() throws Exception {
@@ -126,22 +126,22 @@ public final class FOTreeTestSuite {
}
private static class FOTreeTestCase extends TestCase {
-
+
private FOTreeTester tester;
private File testFile;
-
+
public FOTreeTestCase(String name) {
super(name);
}
-
+
public void prepare(FOTreeTester tester, File testFile) {
//super(testFile.getName());
this.tester = tester;
this.testFile = testFile;
}
-
+
public void testMain() throws Exception {
tester.runTest(testFile);
}
- }
+ }
}
diff --git a/test/java/org/apache/fop/fotreetest/FOTreeTester.java b/test/java/org/apache/fop/fotreetest/FOTreeTester.java
index 6ffad6989..fe44e3e23 100644
--- a/test/java/org/apache/fop/fotreetest/FOTreeTester.java
+++ b/test/java/org/apache/fop/fotreetest/FOTreeTester.java
@@ -39,7 +39,7 @@ import org.apache.fop.util.ConsoleEventListenerForTests;
* Test driver class for FO tree tests.
*/
public class FOTreeTester {
-
+
private FopFactory fopFactory = FopFactory.newInstance();
/**
@@ -48,7 +48,7 @@ public class FOTreeTester {
public FOTreeTester() {
fopFactory.addElementMapping(new TestElementMapping());
}
-
+
/**
* Runs a test.
* @param testFile the test file.
@@ -57,13 +57,13 @@ public class FOTreeTester {
public void runTest(File testFile) throws Exception {
ResultCollector collector = ResultCollector.getInstance();
collector.reset();
-
+
SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setNamespaceAware(true);
spf.setValidating(false);
SAXParser parser = spf.newSAXParser();
XMLReader reader = parser.getXMLReader();
-
+
FOUserAgent ua = fopFactory.newFOUserAgent();
ua.setBaseURL(testFile.getParentFile().toURL().toString());
ua.setFOEventHandlerOverride(new DummyFOEventHandler(ua));
@@ -72,15 +72,15 @@ public class FOTreeTester {
//Used to set values in the user agent through processing instructions
reader = new PIListener(reader, ua);
-
+
Fop fop = fopFactory.newFop(ua);
-
+
reader.setContentHandler(fop.getDefaultHandler());
reader.setDTDHandler(fop.getDefaultHandler());
reader.setErrorHandler(fop.getDefaultHandler());
reader.setEntityResolver(fop.getDefaultHandler());
reader.parse(testFile.toURL().toExternalForm());
-
+
List results = collector.getResults();
if (results.size() > 0) {
for (int i = 0; i < results.size(); i++) {
@@ -91,9 +91,9 @@ public class FOTreeTester {
}
private class PIListener extends XMLFilterImpl {
-
+
private FOUserAgent userAgent;
-
+
public PIListener(XMLReader parent, FOUserAgent userAgent) {
super(parent);
this.userAgent = userAgent;
@@ -107,7 +107,7 @@ public class FOTreeTester {
}
super.processingInstruction(target, data);
}
-
+
}
-
+
}
diff --git a/test/java/org/apache/fop/fotreetest/FOTreeUnitTester.java b/test/java/org/apache/fop/fotreetest/FOTreeUnitTester.java
index a7fa11950..bfe9018b1 100644
--- a/test/java/org/apache/fop/fotreetest/FOTreeUnitTester.java
+++ b/test/java/org/apache/fop/fotreetest/FOTreeUnitTester.java
@@ -56,7 +56,7 @@ public abstract class FOTreeUnitTester extends TestCase {
* This method is called by FOTreeUnitTester when creating a {@link Fop} instance.
* That lets pass to the custom FOEventHandler the proper user agent that will be
* used by this instance.
- *
+ *
* @param foUserAgent the user agent needed by the Fop instance that will be used
* to create the FO tree
* @return the appropriate FOEventHandler for performing the tests
@@ -77,9 +77,9 @@ public abstract class FOTreeUnitTester extends TestCase {
/**
* Launches FOP on the given FO file.
- *
+ *
* @param filename path to the test FO file
- * @param factory to create the appropriate FOEventHandler for performing tests
+ * @param factory to create the appropriate FOEventHandler for performing tests
*/
public void setUp(String filename, FOEventHandlerFactory factory) throws Exception {
FOUserAgent ua = fopFactory.newFOUserAgent();
diff --git a/test/java/org/apache/fop/fotreetest/ResultCollector.java b/test/java/org/apache/fop/fotreetest/ResultCollector.java
index a1c7cee7c..36d111c7f 100644
--- a/test/java/org/apache/fop/fotreetest/ResultCollector.java
+++ b/test/java/org/apache/fop/fotreetest/ResultCollector.java
@@ -23,14 +23,14 @@ import java.util.Collections;
import java.util.List;
/**
- * This class collects the results from assertions injected into the FO stream.
+ * This class collects the results from assertions injected into the FO stream.
*/
public class ResultCollector {
private static ResultCollector instance = null;
-
+
private List results = new java.util.ArrayList();
-
+
/** @return the ResultColletor singleton */
public static ResultCollector getInstance() {
if (instance == null) {
@@ -38,12 +38,12 @@ public class ResultCollector {
}
return instance;
}
-
+
/** Main constructor. */
public ResultCollector() {
//nop
}
-
+
/**
* This notifies the ResultCollector about an Exception.
* @param e the exception
@@ -52,12 +52,12 @@ public class ResultCollector {
System.out.println(e.getMessage());
results.add(e);
}
-
+
/** Resets the result list. */
public void reset() {
results.clear();
}
-
+
/** @return the list of results */
public List getResults() {
return Collections.unmodifiableList(results);
diff --git a/test/java/org/apache/fop/fotreetest/ext/AssertElement.java b/test/java/org/apache/fop/fotreetest/ext/AssertElement.java
index b141c8f4a..97b73947c 100644
--- a/test/java/org/apache/fop/fotreetest/ext/AssertElement.java
+++ b/test/java/org/apache/fop/fotreetest/ext/AssertElement.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fotreetest.ext;
@@ -50,9 +50,9 @@ public class AssertElement extends TestObj {
/**
* @see org.apache.fop.fo.FONode#processNode
*/
- public void processNode(String elementName,
- Locator locator,
- Attributes attlist,
+ public void processNode(String elementName,
+ Locator locator,
+ Attributes attlist,
PropertyList propertyList) throws FOPException {
//super.processNode(elementName, locator, attlist, propertyList);
@@ -102,22 +102,22 @@ public class AssertElement extends TestObj {
if (!expected.equals(s)) {
collector.notifyException(
new IllegalStateException(locator.getSystemId()
- + "\nProperty '" + propName
- + "' expected to evaluate to '" + expected
+ + "\nProperty '" + propName
+ + "' expected to evaluate to '" + expected
+ "' but got '" + s
- + "'\n(test:assert in "
+ + "'\n(test:assert in "
+ propertyList.getParentFObj().getName()
- + " at line #" + locator.getLineNumber()
+ + " at line #" + locator.getLineNumber()
+ ", column #" + locator.getColumnNumber() + ")\n"));
}
}
-
+
}
/** @see org.apache.fop.fo.FONode#getLocalName() */
public String getLocalName() {
return "assert";
}
-
+
}
diff --git a/test/java/org/apache/fop/fotreetest/ext/TestElementMapping.java b/test/java/org/apache/fop/fotreetest/ext/TestElementMapping.java
index f0b8ef2c8..1d9127d0c 100644
--- a/test/java/org/apache/fop/fotreetest/ext/TestElementMapping.java
+++ b/test/java/org/apache/fop/fotreetest/ext/TestElementMapping.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fotreetest.ext;
import org.apache.fop.fo.FONode;
@@ -28,7 +28,7 @@ import org.apache.fop.fo.ElementMapping;
public class TestElementMapping extends ElementMapping {
/** MathML Namespace */
- public static final String NAMESPACE = "http://xmlgraphics.apache.org/fop/test";
+ public static final String NAMESPACE = "http://xmlgraphics.apache.org/fop/test";
/**
* Main constructor
diff --git a/test/java/org/apache/fop/fotreetest/ext/TestObj.java b/test/java/org/apache/fop/fotreetest/ext/TestObj.java
index 615062304..e921c8919 100644
--- a/test/java/org/apache/fop/fotreetest/ext/TestObj.java
+++ b/test/java/org/apache/fop/fotreetest/ext/TestObj.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.fotreetest.ext;
// FOP
diff --git a/test/java/org/apache/fop/image/loader/batik/ImageLoaderTestCase.java b/test/java/org/apache/fop/image/loader/batik/ImageLoaderTestCase.java
index 9261e6d84..c6c4015cc 100644
--- a/test/java/org/apache/fop/image/loader/batik/ImageLoaderTestCase.java
+++ b/test/java/org/apache/fop/image/loader/batik/ImageLoaderTestCase.java
@@ -40,26 +40,26 @@ import org.apache.fop.apps.FopFactory;
public class ImageLoaderTestCase extends TestCase {
private static final File DEBUG_TARGET_DIR = null; //new File("D:/");
-
+
private FopFactory fopFactory;
-
+
public ImageLoaderTestCase(String name) {
super(name);
fopFactory = FopFactory.newInstance();
fopFactory.setSourceResolution(72);
fopFactory.setTargetResolution(300);
}
-
+
public void testSVG() throws Exception {
String uri = "test/resources/images/img-w-size.svg";
-
+
FOUserAgent userAgent = fopFactory.newFOUserAgent();
-
+
ImageManager manager = fopFactory.getImageManager();
ImageInfo info = manager.preloadImage(uri, userAgent.getImageSessionContext());
assertNotNull("ImageInfo must not be null", info);
-
- Image img = manager.getImage(info, ImageFlavor.XML_DOM,
+
+ Image img = manager.getImage(info, ImageFlavor.XML_DOM,
userAgent.getImageSessionContext());
assertNotNull("Image must not be null", img);
assertEquals(ImageFlavor.XML_DOM, img.getFlavor());
@@ -69,7 +69,7 @@ public class ImageLoaderTestCase extends TestCase {
info = imgDom.getInfo(); //Switch to the ImageInfo returned by the image
assertEquals(16000, info.getSize().getWidthMpt());
assertEquals(16000, info.getSize().getHeightMpt());
-
+
img = manager.getImage(info, ImageFlavor.RENDERED_IMAGE,
userAgent.getImageSessionContext());
assertNotNull("Image must not be null", img);
@@ -87,16 +87,16 @@ public class ImageLoaderTestCase extends TestCase {
assertEquals(16000, info.getSize().getWidthMpt());
assertEquals(16000, info.getSize().getHeightMpt());
}
-
+
public void testWMF() throws Exception {
String uri = "test/resources/images/testChart.wmf";
-
+
FOUserAgent userAgent = fopFactory.newFOUserAgent();
-
+
ImageManager manager = fopFactory.getImageManager();
ImageInfo info = manager.preloadImage(uri, userAgent.getImageSessionContext());
assertNotNull("ImageInfo must not be null", info);
-
+
Image img = manager.getImage(info, ImageFlavor.RENDERED_IMAGE,
userAgent.getImageSessionContext());
assertNotNull("Image must not be null", img);
@@ -114,5 +114,5 @@ public class ImageLoaderTestCase extends TestCase {
assertEquals(792000, info.getSize().getWidthMpt());
assertEquals(612000, info.getSize().getHeightMpt());
}
-
+
}
diff --git a/test/java/org/apache/fop/image/loader/batik/ImagePreloaderTestCase.java b/test/java/org/apache/fop/image/loader/batik/ImagePreloaderTestCase.java
index 9406ed65c..057866eb9 100644
--- a/test/java/org/apache/fop/image/loader/batik/ImagePreloaderTestCase.java
+++ b/test/java/org/apache/fop/image/loader/batik/ImagePreloaderTestCase.java
@@ -48,29 +48,29 @@ import org.apache.fop.apps.MimeConstants;
public class ImagePreloaderTestCase extends TestCase {
private FopFactory fopFactory;
-
+
public ImagePreloaderTestCase(String name) {
super(name);
fopFactory = FopFactory.newInstance();
fopFactory.setSourceResolution(72);
fopFactory.setTargetResolution(300);
}
-
+
public void testSVG() throws Exception {
String uri = "test/resources/images/img-w-size.svg";
-
+
checkSVGFile(uri);
}
public void testSVGZ() throws Exception {
String uri = "test/resources/images/img-w-size.svgz";
-
+
checkSVGFile(uri);
}
private void checkSVGFile(String uri) throws ImageException, IOException {
FOUserAgent userAgent = fopFactory.newFOUserAgent();
-
+
ImageManager manager = fopFactory.getImageManager();
ImageInfo info = manager.preloadImage(uri, userAgent.getImageSessionContext());
assertNotNull("ImageInfo must not be null", info);
@@ -82,11 +82,11 @@ public class ImagePreloaderTestCase extends TestCase {
assertEquals(16000, info.getSize().getWidthMpt());
assertEquals(16000, info.getSize().getHeightMpt());
}
-
+
public void testSVGNoSize() throws Exception {
String uri = "test/resources/images/img.svg";
FOUserAgent userAgent = fopFactory.newFOUserAgent();
-
+
ImageManager manager = fopFactory.getImageManager();
ImageInfo info = manager.preloadImage(uri, userAgent.getImageSessionContext());
assertNotNull("ImageInfo must not be null", info);
@@ -102,7 +102,7 @@ public class ImagePreloaderTestCase extends TestCase {
public void testSVGWithDOM() throws Exception {
String uri = "my:SVGImage";
FOUserAgent userAgent = fopFactory.newFOUserAgent();
-
+
userAgent.setURIResolver(new URIResolver() {
public Source resolve(String href, String base) throws TransformerException {
@@ -114,23 +114,23 @@ public class ImagePreloaderTestCase extends TestCase {
element.setAttribute("viewBox", "0 0 20 20");
element.setAttribute("width", "20pt");
element.setAttribute("height", "20pt");
-
+
Element rect = doc.createElementNS(svgNS, "rect");
rect.setAttribute("x", "5");
rect.setAttribute("y", "5");
rect.setAttribute("width", "10");
rect.setAttribute("height", "10");
element.appendChild(rect);
-
+
DOMSource src = new DOMSource(doc);
return src;
} else {
return null;
}
}
-
+
});
-
+
ImageManager manager = fopFactory.getImageManager();
ImageInfo info = manager.preloadImage(uri, userAgent.getImageSessionContext());
assertNotNull("ImageInfo must not be null", info);
@@ -145,9 +145,9 @@ public class ImagePreloaderTestCase extends TestCase {
public void testWMF() throws Exception {
String uri = "test/resources/images/testChart.wmf";
-
+
FOUserAgent userAgent = fopFactory.newFOUserAgent();
-
+
ImageManager manager = fopFactory.getImageManager();
ImageInfo info = manager.preloadImage(uri, userAgent.getImageSessionContext());
assertNotNull("ImageInfo must not be null", info);
@@ -159,5 +159,5 @@ public class ImagePreloaderTestCase extends TestCase {
assertEquals(792000, info.getSize().getWidthMpt());
assertEquals(612000, info.getSize().getHeightMpt());
}
-
+
}
diff --git a/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java b/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java
index 96aa89bc3..76cca1569 100644
--- a/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java
+++ b/test/java/org/apache/fop/intermediate/AreaTreeParserTestCase.java
@@ -63,25 +63,25 @@ public class AreaTreeParserTestCase extends XMLTestCase {
// configure fopFactory as desired
private static FopFactory fopFactory = FopFactory.newInstance();
-
- private static SAXTransformerFactory tFactory
+
+ private static SAXTransformerFactory tFactory
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();
private static Templates stylesheet = null;
-
+
private File mainDir = new File("test/layoutengine");
private File testDir = new File(mainDir, "standard-testcases");
-
+
private String name;
private File testFile;
private File outputDir;
private Document intermediate;
-
+
/** @see junit.framework.TestCase#TestCase(String) */
public AreaTreeParserTestCase(String name) {
super(name);
}
-
+
/**
* Constructor for the test suite that is used for each test file.
* @param testFile the test file to run
@@ -90,7 +90,7 @@ public class AreaTreeParserTestCase extends XMLTestCase {
super(testFile.getName());
this.testFile = testFile;
}
-
+
private Templates getStylesheet() throws TransformerConfigurationException {
if (stylesheet == null) {
File xsltFile = new File(mainDir, "testcase2fo.xsl");
@@ -98,7 +98,7 @@ public class AreaTreeParserTestCase extends XMLTestCase {
}
return stylesheet;
}
-
+
/** @see junit.framework.TestCase#setUp() */
protected void setUp() throws Exception {
super.setUp();
@@ -127,17 +127,17 @@ public class AreaTreeParserTestCase extends XMLTestCase {
* @throws Exception if the test fails
*/
public void testParserToAT() throws Exception {
-
+
Source src = new DOMSource(intermediate);
Document doc = parseAndRenderToAreaTree(src);
if (outputDir != null) {
File tgtFile = new File(outputDir, name + ".at2.xml");
saveDOM(doc, tgtFile);
}
-
+
assertXMLEqual(intermediate, doc);
}
-
+
private void saveDOM(Document doc, File tgtFile) throws Exception {
Transformer transformer = tFactory.newTransformer();
Source src = new DOMSource(doc);
@@ -166,7 +166,7 @@ public class AreaTreeParserTestCase extends XMLTestCase {
IOUtils.closeQuietly(out);
}
}
-
+
private FOUserAgent createUserAgent() {
FOUserAgent userAgent = fopFactory.newFOUserAgent();
try {
@@ -191,41 +191,41 @@ public class AreaTreeParserTestCase extends XMLTestCase {
TransformerHandler handler = tFactory.newTransformerHandler();
DOMResult domResult = new DOMResult();
handler.setResult(domResult);
-
+
FOUserAgent userAgent = createUserAgent();
//Create an instance of the target renderer so the XMLRenderer can use its font setup
Renderer targetRenderer = userAgent.getRendererFactory().createRenderer(
- userAgent, MimeConstants.MIME_PDF);
-
+ userAgent, MimeConstants.MIME_PDF);
+
XMLRenderer renderer = new XMLRenderer();
renderer.mimicRenderer(targetRenderer);
renderer.setContentHandler(handler);
renderer.setUserAgent(userAgent);
userAgent.setRendererOverride(renderer);
-
+
Fop fop = fopFactory.newFop(MimeConstants.MIME_FOP_AREA_TREE, userAgent);
Result res = new SAXResult(fop.getDefaultHandler());
transformer.transform(src, res);
-
+
return (Document)domResult.getNode();
}
-
+
private void parseAndRender(Source src, OutputStream out, String mime) throws Exception {
AreaTreeParser parser = new AreaTreeParser();
-
+
FOUserAgent userAgent = createUserAgent();
FontInfo fontInfo = new FontInfo();
- AreaTreeModel treeModel = new RenderPagesModel(userAgent,
- mime, fontInfo, out);
+ AreaTreeModel treeModel = new RenderPagesModel(userAgent,
+ mime, fontInfo, out);
parser.parse(src, treeModel, userAgent);
treeModel.endDocument();
}
-
+
private Document parseAndRenderToAreaTree(Source src) throws Exception {
AreaTreeParser parser = new AreaTreeParser();
-
+
//Set up XMLRenderer to render to a DOM
TransformerHandler handler = tFactory.newTransformerHandler();
DOMResult domResult = new DOMResult();
@@ -238,12 +238,12 @@ public class AreaTreeParserTestCase extends XMLTestCase {
renderer.setUserAgent(userAgent);
FontInfo fontInfo = new FontInfo();
- AreaTreeModel treeModel = new RenderPagesModel(userAgent,
- MimeConstants.MIME_FOP_AREA_TREE, fontInfo, null);
+ AreaTreeModel treeModel = new RenderPagesModel(userAgent,
+ MimeConstants.MIME_FOP_AREA_TREE, fontInfo, null);
parser.parse(src, treeModel, userAgent);
treeModel.endDocument();
return (Document)domResult.getNode();
}
-
+
}
diff --git a/test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java b/test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java
index 68c81da81..5960f746c 100644
--- a/test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java
+++ b/test/java/org/apache/fop/intermediate/IntermediateFormatTestSuite.java
@@ -48,11 +48,11 @@ public class IntermediateFormatTestSuite {
File f = (File)i.next();
addTestCase(suite, f);
}
-
+
return suite;
}
-
- private static void addTestCase(TestSuite suite,
+
+ private static void addTestCase(TestSuite suite,
final File f) {
suite.addTest(new AreaTreeParserTestCase(f) {
public void runTest() throws Exception {
@@ -67,5 +67,5 @@ public class IntermediateFormatTestSuite {
}
});
}
-
+
}
diff --git a/test/java/org/apache/fop/layoutengine/ElementListCheck.java b/test/java/org/apache/fop/layoutengine/ElementListCheck.java
index 14eba7b98..1b6077c29 100644
--- a/test/java/org/apache/fop/layoutengine/ElementListCheck.java
+++ b/test/java/org/apache/fop/layoutengine/ElementListCheck.java
@@ -41,7 +41,7 @@ public class ElementListCheck implements LayoutEngineCheck {
private String id;
private int index = -1;
private Element checkElement;
-
+
/**
* Creates a new instance from a DOM node.
* @param node DOM node that defines this check
@@ -68,7 +68,7 @@ public class ElementListCheck implements LayoutEngineCheck {
NodeList children = checkElement.getChildNodes();
int pos = -1;
for (int i = 0; i < children.getLength(); i++) {
- Node node = children.item(i);
+ Node node = children.item(i);
if (node instanceof Element) {
pos++;
Element domEl = (Element)node;
@@ -78,14 +78,14 @@ public class ElementListCheck implements LayoutEngineCheck {
} else if ("box".equals(domEl.getLocalName())) {
if (!(knuthEl instanceof KnuthBox)) {
fail("Expected KnuthBox"
- + " at position " + pos
+ + " at position " + pos
+ " but got: " + knuthEl.getClass().getName());
}
if (domEl.getAttribute("w").length() > 0) {
int w = Integer.parseInt(domEl.getAttribute("w"));
if (w != knuthEl.getW()) {
- fail("Expected w=" + w
- + " at position " + pos
+ fail("Expected w=" + w
+ + " at position " + pos
+ " but got: " + knuthEl.getW());
}
}
@@ -104,29 +104,29 @@ public class ElementListCheck implements LayoutEngineCheck {
} else if ("penalty".equals(domEl.getLocalName())) {
if (!(knuthEl instanceof KnuthPenalty)) {
fail("Expected KnuthPenalty "
- + " at position " + pos
+ + " at position " + pos
+ " but got: " + knuthEl.getClass().getName());
}
KnuthPenalty pen = (KnuthPenalty)knuthEl;
if (domEl.getAttribute("w").length() > 0) {
int w = Integer.parseInt(domEl.getAttribute("w"));
if (w != knuthEl.getW()) {
- fail("Expected w=" + w
- + " at position " + pos
+ fail("Expected w=" + w
+ + " at position " + pos
+ " but got: " + knuthEl.getW());
}
}
if (domEl.getAttribute("p").length() > 0) {
if ("<0".equals(domEl.getAttribute("p"))) {
if (knuthEl.getP() >= 0) {
- fail("Expected p<0"
- + " at position " + pos
+ fail("Expected p<0"
+ + " at position " + pos
+ " but got: " + knuthEl.getP());
}
} else if (">0".equals(domEl.getAttribute("p"))) {
if (knuthEl.getP() <= 0) {
- fail("Expected p>0"
- + " at position " + pos
+ fail("Expected p>0"
+ + " at position " + pos
+ " but got: " + knuthEl.getP());
}
} else {
@@ -143,8 +143,8 @@ public class ElementListCheck implements LayoutEngineCheck {
p = Integer.parseInt(domEl.getAttribute("p"));
}
if (p != knuthEl.getP()) {
- fail("Expected p=" + p
- + " at position " + pos
+ fail("Expected p=" + p
+ + " at position " + pos
+ " but got: " + knuthEl.getP());
}
}
@@ -152,7 +152,7 @@ public class ElementListCheck implements LayoutEngineCheck {
if ("true".equals(domEl.getAttribute("flagged"))) {
if (!pen.isFlagged()) {
fail("Expected flagged penalty"
- + " at position " + pos);
+ + " at position " + pos);
}
} else if ("false".equals(domEl.getAttribute("flagged"))) {
if (pen.isFlagged()) {
@@ -163,57 +163,57 @@ public class ElementListCheck implements LayoutEngineCheck {
if ("true".equals(domEl.getAttribute("aux"))) {
if (!pen.isAuxiliary()) {
fail("Expected auxiliary penalty"
- + " at position " + pos);
+ + " at position " + pos);
}
} else if ("false".equals(domEl.getAttribute("aux"))) {
if (pen.isAuxiliary()) {
fail("Expected non-auxiliary penalty"
- + " at position " + pos);
+ + " at position " + pos);
}
}
} else if ("glue".equals(domEl.getLocalName())) {
if (!(knuthEl instanceof KnuthGlue)) {
- fail("Expected KnuthGlue"
- + " at position " + pos
+ fail("Expected KnuthGlue"
+ + " at position " + pos
+ " but got: " + knuthEl.getClass().getName());
}
KnuthGlue glue = (KnuthGlue)knuthEl;
if (domEl.getAttribute("w").length() > 0) {
int w = Integer.parseInt(domEl.getAttribute("w"));
if (w != knuthEl.getW()) {
- fail("Expected w=" + w
- + " at position " + pos
+ fail("Expected w=" + w
+ + " at position " + pos
+ " but got: " + knuthEl.getW());
}
}
if (domEl.getAttribute("y").length() > 0) {
int stretch = Integer.parseInt(domEl.getAttribute("y"));
if (stretch != knuthEl.getY()) {
- fail("Expected y=" + stretch
- + " (stretch) at position " + pos
+ fail("Expected y=" + stretch
+ + " (stretch) at position " + pos
+ " but got: " + knuthEl.getY());
}
}
if (domEl.getAttribute("z").length() > 0) {
int shrink = Integer.parseInt(domEl.getAttribute("z"));
if (shrink != knuthEl.getZ()) {
- fail("Expected z=" + shrink
- + " (shrink) at position " + pos
+ fail("Expected z=" + shrink
+ + " (shrink) at position " + pos
+ " but got: " + knuthEl.getZ());
}
}
} else {
- throw new IllegalArgumentException("Invalid child node for 'element-list': "
+ throw new IllegalArgumentException("Invalid child node for 'element-list': "
+ domEl.getLocalName()
+ " at position " + pos + " (" + this + ")");
}
-
+
}
}
pos++;
if (elementList.getElementList().size() > pos) {
- fail("There are "
- + (elementList.getElementList().size() - pos)
+ fail("There are "
+ + (elementList.getElementList().size() - pos)
+ " unchecked elements at the end of the list");
}
}
@@ -221,7 +221,7 @@ public class ElementListCheck implements LayoutEngineCheck {
private void fail(String msg) {
throw new RuntimeException(msg + " (" + this + ")");
}
-
+
private boolean haveID() {
return (this.id != null && this.id.length() > 0);
}
@@ -262,7 +262,7 @@ public class ElementListCheck implements LayoutEngineCheck {
}
return sb.toString();
}
-
+
/** @see java.lang.Object#toString() */
public String toString() {
StringBuffer sb = new StringBuffer("element-list");
diff --git a/test/java/org/apache/fop/layoutengine/ElementListCollector.java b/test/java/org/apache/fop/layoutengine/ElementListCollector.java
index 3bad1de98..d6ed12047 100644
--- a/test/java/org/apache/fop/layoutengine/ElementListCollector.java
+++ b/test/java/org/apache/fop/layoutengine/ElementListCollector.java
@@ -30,21 +30,21 @@ import org.apache.fop.layoutmgr.ElementListObserver.Observer;
public class ElementListCollector implements Observer {
private List elementLists = new java.util.ArrayList();
-
+
/**
* Resets the collector.
*/
public void reset() {
elementLists.clear();
}
-
+
/**
* @return the list of ElementList instances.
*/
public List getElementLists() {
return this.elementLists;
}
-
+
/** @see org.apache.fop.layoutmgr.ElementListObserver.Observer */
public void observe(List elementList, String category, String id) {
elementLists.add(new ElementList(elementList, category, id));
@@ -54,11 +54,11 @@ public class ElementListCollector implements Observer {
* Data object representing an element list along with additional information.
*/
public static class ElementList {
-
+
private List elementList;
private String category;
private String id;
-
+
/**
* Creates a new ElementList instance
* @param elementList the element list
@@ -70,21 +70,21 @@ public class ElementListCollector implements Observer {
this.category = category;
this.id = id;
}
-
+
/** @return the element list */
public List getElementList() {
return elementList;
}
-
+
/** @return the category */
public String getCategory() {
return category;
}
-
+
/** @return the ID, may be null */
public String getID() {
return id;
}
}
-
+
} \ No newline at end of file
diff --git a/test/java/org/apache/fop/layoutengine/EvalCheck.java b/test/java/org/apache/fop/layoutengine/EvalCheck.java
index bae98ee5f..2dd9405bf 100644
--- a/test/java/org/apache/fop/layoutengine/EvalCheck.java
+++ b/test/java/org/apache/fop/layoutengine/EvalCheck.java
@@ -36,7 +36,7 @@ public class EvalCheck implements LayoutEngineCheck {
private String xpath;
private double tolerance;
private PrefixResolver prefixResolver;
-
+
/**
* Creates a new instance
* @param expected expected value
@@ -46,7 +46,7 @@ public class EvalCheck implements LayoutEngineCheck {
this.expected = expected;
this.xpath = xpath;
}
-
+
/**
* Creates a new instance from a DOM node.
* @param node DOM node that defines this check
@@ -60,7 +60,7 @@ public class EvalCheck implements LayoutEngineCheck {
}
this.prefixResolver = new PrefixResolverDefault(node);
}
-
+
/** @see org.apache.fop.layoutengine.LayoutEngineCheck */
public void check(LayoutResult result) {
XObject res;
@@ -75,13 +75,13 @@ public class EvalCheck implements LayoutEngineCheck {
double v2 = Double.parseDouble(actual);
if (Math.abs(v1 - v2) > tolerance) {
throw new RuntimeException(
- "Expected XPath expression to evaluate to '" + expected + "', but got '"
+ "Expected XPath expression to evaluate to '" + expected + "', but got '"
+ actual + "' (" + this + ", outside tolerance)");
}
} else {
if (!expected.equals(actual)) {
throw new RuntimeException(
- "Expected XPath expression to evaluate to '" + expected + "', but got '"
+ "Expected XPath expression to evaluate to '" + expected + "', but got '"
+ actual + "' (" + this + ")");
}
}
diff --git a/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java b/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java
index 22741827a..155db2263 100644
--- a/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java
+++ b/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java
@@ -29,5 +29,5 @@ public interface LayoutEngineCheck {
* @param result the results from the processing run
*/
void check(LayoutResult result);
-
+
}
diff --git a/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java b/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java
index 0597e0e91..32a48fb0b 100644
--- a/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java
+++ b/test/java/org/apache/fop/layoutengine/LayoutEngineTestSuite.java
@@ -61,7 +61,7 @@ public class LayoutEngineTestSuite {
static {
DebugHelper.registerStandardElementListObservers();
}
-
+
public static String[] readDisabledTestcases(File f) throws IOException {
List lines = new java.util.ArrayList();
Source stylesheet = new StreamSource(
@@ -78,7 +78,7 @@ public class LayoutEngineTestSuite {
}
return (String[])lines.toArray(new String[lines.size()]);
}
-
+
private static class FilenameHandler extends DefaultHandler {
private StringBuffer buffer = new StringBuffer(128);
private boolean readingFilename = false;
@@ -88,7 +88,7 @@ public class LayoutEngineTestSuite {
this.filenames = filenames;
}
- public void startElement(String namespaceURI, String localName, String qName,
+ public void startElement(String namespaceURI, String localName, String qName,
Attributes atts) throws SAXException {
if (qName != null && qName.equals("file")) {
buffer.setLength(0);
@@ -99,7 +99,7 @@ public class LayoutEngineTestSuite {
}
}
- public void endElement(String namespaceURI, String localName, String qName)
+ public void endElement(String namespaceURI, String localName, String qName)
throws SAXException {
if (qName != null && qName.equals("file")) {
readingFilename = false;
@@ -116,7 +116,7 @@ public class LayoutEngineTestSuite {
}
}
}
-
+
public static IOFileFilter decorateWithDisabledList(IOFileFilter filter) throws IOException {
String disabled = System.getProperty("fop.layoutengine.disabled");
if (disabled != null && disabled.length() > 0) {
@@ -126,7 +126,7 @@ public class LayoutEngineTestSuite {
}
return filter;
}
-
+
/**
* @return a Collection of File instances containing all the test cases set up for processing.
* @throws IOException if there's a problem gathering the list of test files
@@ -150,18 +150,18 @@ public class LayoutEngineTestSuite {
if (testset == null) {
testset = "standard";
}
- Collection files = FileUtils.listFiles(new File(mainDir, testset + "-testcases"),
+ Collection files = FileUtils.listFiles(new File(mainDir, testset + "-testcases"),
filter, TrueFileFilter.INSTANCE);
String privateTests = System.getProperty("fop.layoutengine.private");
if ("true".equalsIgnoreCase(privateTests)) {
Collection privateFiles = FileUtils.listFiles(
- new File(mainDir, "private-testcases"),
+ new File(mainDir, "private-testcases"),
filter, TrueFileFilter.INSTANCE);
files.addAll(privateFiles);
}
return files;
}
-
+
/**
* @return the test suite with all the tests (one for each XML file)
* @throws IOException in case of an I/O problem
@@ -180,11 +180,11 @@ public class LayoutEngineTestSuite {
File f = (File)i.next();
addTestCase(suite, tester, f);
}
-
+
return suite;
}
-
- private static void addTestCase(TestSuite suite,
+
+ private static void addTestCase(TestSuite suite,
final LayoutEngineTester tester, final File f) {
suite.addTest(new LayoutEngineTestCase(f.getName()) {
public void runTest() throws Exception {
@@ -199,24 +199,24 @@ public class LayoutEngineTestSuite {
}
});
}
-
+
private static class LayoutEngineTestCase extends TestCase {
-
+
private LayoutEngineTester tester;
private File testFile;
-
+
public LayoutEngineTestCase(String name) {
super(name);
}
-
+
public void prepare(LayoutEngineTester tester, File testFile) {
//super(testFile.getName());
this.tester = tester;
this.testFile = testFile;
}
-
+
public void testMain() throws Exception {
tester.runTest(testFile);
}
- }
+ }
}
diff --git a/test/java/org/apache/fop/layoutengine/LayoutResult.java b/test/java/org/apache/fop/layoutengine/LayoutResult.java
index aa425c2ce..52c83daa8 100644
--- a/test/java/org/apache/fop/layoutengine/LayoutResult.java
+++ b/test/java/org/apache/fop/layoutengine/LayoutResult.java
@@ -30,7 +30,7 @@ public class LayoutResult {
private Document areaTree;
private ElementListCollector elCollector;
private FormattingResults results;
-
+
/**
* Creates a new LayoutResult instance.
* @param areaTree the area tree DOM
@@ -43,12 +43,12 @@ public class LayoutResult {
this.elCollector = elCollector;
this.results = results;
}
-
+
/** @return the generated area tree as DOM tree */
public Document getAreaTree() {
return this.areaTree;
}
-
+
/** @return the element list collector */
public ElementListCollector getElementListCollector() {
return this.elCollector;
@@ -60,5 +60,5 @@ public class LayoutResult {
public FormattingResults getResults() {
return results;
}
-
+
}
diff --git a/test/java/org/apache/fop/layoutengine/ResultCheck.java b/test/java/org/apache/fop/layoutengine/ResultCheck.java
index d7a55691f..54af77a43 100644
--- a/test/java/org/apache/fop/layoutengine/ResultCheck.java
+++ b/test/java/org/apache/fop/layoutengine/ResultCheck.java
@@ -29,7 +29,7 @@ public class ResultCheck implements LayoutEngineCheck {
private String expected;
private String property;
-
+
/**
* Creates a new instance
* @param expected expected value
@@ -39,7 +39,7 @@ public class ResultCheck implements LayoutEngineCheck {
this.expected = expected;
this.property = property;
}
-
+
/**
* Creates a new instance from a DOM node.
* @param node DOM node that defines this check
@@ -48,7 +48,7 @@ public class ResultCheck implements LayoutEngineCheck {
this.expected = node.getAttributes().getNamedItem("expected").getNodeValue();
this.property = node.getAttributes().getNamedItem("property").getNodeValue();
}
-
+
/* (non-Javadoc)
* @see LayoutEngineCheck#check(LayoutResult)
*/
@@ -62,7 +62,7 @@ public class ResultCheck implements LayoutEngineCheck {
}
if (!expected.equals(actual)) {
throw new RuntimeException(
- "Expected property to evaluate to '" + expected + "', but got '"
+ "Expected property to evaluate to '" + expected + "', but got '"
+ actual + "' (" + this + ")");
}
diff --git a/test/java/org/apache/fop/layoutengine/TrueCheck.java b/test/java/org/apache/fop/layoutengine/TrueCheck.java
index b4504f63e..202398d2f 100644
--- a/test/java/org/apache/fop/layoutengine/TrueCheck.java
+++ b/test/java/org/apache/fop/layoutengine/TrueCheck.java
@@ -36,7 +36,7 @@ public class TrueCheck implements LayoutEngineCheck {
private String xpath;
private String failureMessage;
private PrefixResolver prefixResolver;
-
+
/**
* Creates a new instance
* @param xpath XPath statement that needs to be evaluated
@@ -44,7 +44,7 @@ public class TrueCheck implements LayoutEngineCheck {
public TrueCheck(String xpath) {
this.xpath = xpath;
}
-
+
/**
* Creates a new instance from a DOM node.
* @param node DOM node that defines this check
@@ -57,7 +57,7 @@ public class TrueCheck implements LayoutEngineCheck {
}
this.prefixResolver = new PrefixResolverDefault(node);
}
-
+
/** @see org.apache.fop.layoutengine.LayoutEngineCheck */
public void check(LayoutResult result) {
XObject res;
@@ -71,7 +71,7 @@ public class TrueCheck implements LayoutEngineCheck {
throw new RuntimeException(failureMessage);
} else {
throw new RuntimeException(
- "Expected XPath expression to evaluate to 'true', but got '"
+ "Expected XPath expression to evaluate to 'true', but got '"
+ res + "' (" + this + ")");
}
}
@@ -82,5 +82,5 @@ public class TrueCheck implements LayoutEngineCheck {
public String toString() {
return "XPath: " + xpath;
}
-
+
}
diff --git a/test/java/org/apache/fop/memory/MemoryEater.java b/test/java/org/apache/fop/memory/MemoryEater.java
index 1bea0f123..bdbd47897 100644
--- a/test/java/org/apache/fop/memory/MemoryEater.java
+++ b/test/java/org/apache/fop/memory/MemoryEater.java
@@ -5,9 +5,9 @@
* 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.
@@ -50,29 +50,29 @@ public class MemoryEater {
= (SAXTransformerFactory)SAXTransformerFactory.newInstance();
private FopFactory fopFactory = FopFactory.newInstance();
private Templates replicatorTemplates;
-
+
public MemoryEater() throws TransformerConfigurationException, MalformedURLException {
File xsltFile = new File("test/xsl/fo-replicator.xsl");
Source xslt = new StreamSource(xsltFile);
replicatorTemplates = tFactory.newTemplates(xslt);
}
-
+
private void eatMemory(File foFile, int replicatorRepeats) throws Exception {
Source src = new StreamSource(foFile);
-
+
Transformer transformer = replicatorTemplates.newTransformer();
transformer.setParameter("repeats", new Integer(replicatorRepeats));
-
+
OutputStream out = new NullOutputStream(); //write to /dev/nul
FOUserAgent userAgent = fopFactory.newFOUserAgent();
userAgent.setBaseURL(foFile.getParentFile().toURL().toExternalForm());
Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, userAgent, out);
Result res = new SAXResult(fop.getDefaultHandler());
-
+
transformer.transform(src, res);
-
+
System.out.println("Generated " + fop.getResults().getPageCount() + " pages.");
-
+
}
private static void prompt() throws IOException {
@@ -80,7 +80,7 @@ public class MemoryEater {
System.out.print("Press return to continue...");
in.readLine();
}
-
+
/**
* Main method.
* @param args the command-line arguments
@@ -97,24 +97,24 @@ public class MemoryEater {
runRepeats = Integer.parseInt(args[1]);
}
File testFile = new File("examples/fo/basic/readme.fo");
-
- System.out.println("MemoryEater! About to replicate the test file "
+
+ System.out.println("MemoryEater! About to replicate the test file "
+ replicatorRepeats + " times and run it " + runRepeats + " times...");
if (doPrompt) {
prompt();
}
-
- System.out.println("Processing...");
+
+ System.out.println("Processing...");
long start = System.currentTimeMillis();
-
+
MemoryEater app = new MemoryEater();
for (int i = 0; i < runRepeats; i++) {
app.eatMemory(testFile, replicatorRepeats);
}
-
+
long duration = System.currentTimeMillis() - start;
System.out.println("Success! Job took " + duration + " ms");
-
+
if (doPrompt) {
prompt();
}
diff --git a/test/java/org/apache/fop/pdf/PDFObjectTestCase.java b/test/java/org/apache/fop/pdf/PDFObjectTestCase.java
index 96ac728bd..40ddec6ba 100644
--- a/test/java/org/apache/fop/pdf/PDFObjectTestCase.java
+++ b/test/java/org/apache/fop/pdf/PDFObjectTestCase.java
@@ -32,7 +32,7 @@ import junit.framework.TestCase;
public class PDFObjectTestCase extends TestCase {
/**
- * Tests date/time formatting in PDFObject.
+ * Tests date/time formatting in PDFObject.
* @throws Exception if an error occurs
*/
public void testDateFormatting() throws Exception {
@@ -40,7 +40,7 @@ public class PDFObjectTestCase extends TestCase {
cal.set(2008, Calendar.FEBRUARY, 07, 15, 11, 07);
cal.set(Calendar.MILLISECOND, 0);
Date dt = cal.getTime();
-
+
MyPDFObject obj = new MyPDFObject();
String s = obj.formatDateTime(dt, TimeZone.getTimeZone("GMT"));
assertEquals("D:20080207151107Z", s);
@@ -51,9 +51,9 @@ public class PDFObjectTestCase extends TestCase {
s = obj.formatDateTime(dt, TimeZone.getTimeZone("GMT-08:00"));
assertEquals("D:20080207071107-08'00'", s);
}
-
+
private class MyPDFObject extends PDFObject {
-
+
}
-
+
}
diff --git a/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java b/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java
index 29a77a932..7aaf61ea4 100644
--- a/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java
+++ b/test/java/org/apache/fop/render/pdf/BasePDFTestCase.java
@@ -113,7 +113,7 @@ public class BasePDFTestCase extends AbstractFOPTestCase {
return e;
}
- /**
+ /**
* get FOP config File
* @return user config file to be used for testing
*/
diff --git a/test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java b/test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java
index b645022bb..886a2b97e 100644
--- a/test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java
+++ b/test/java/org/apache/fop/render/pdf/PDFAMetadataTestCase.java
@@ -46,11 +46,11 @@ public class PDFAMetadataTestCase extends TestCase {
dc.setTitle("MyTitle");
dc.setDescription(null, "MySubject");
dc.addCreator("That's me");
-
+
AdobePDFAdapter pdf = AdobePDFSchema.getAdapter(meta);
pdf.setKeywords("XSL-FO XML");
pdf.setProducer("SuperFOP");
-
+
XMPBasicAdapter xmp = XMPBasicSchema.getAdapter(meta);
xmp.setCreatorTool("WonderFOP");
Calendar cal1 = Calendar.getInstance(TimeZone.getTimeZone("Europe/Zurich"));
@@ -61,11 +61,11 @@ public class PDFAMetadataTestCase extends TestCase {
cal2.set(2007, Calendar.JUNE, 6, 8, 15, 59);
cal2.set(Calendar.MILLISECOND, 0);
xmp.setModifyDate(cal2.getTime());
-
+
PDFInfo info = new PDFInfo();
assertNull(info.getTitle());
PDFMetadata.updateInfoFromMetadata(meta, info);
-
+
assertEquals("MyTitle", info.getTitle());
assertEquals("MySubject", info.getSubject());
assertEquals("That's me", info.getAuthor());
@@ -75,7 +75,7 @@ public class PDFAMetadataTestCase extends TestCase {
assertEquals(cal1.getTime(), info.getCreationDate());
assertEquals(cal2.getTime(), info.getModDate());
}
-
+
public void testXMPUpdate() throws Exception {
PDFDocument doc = new PDFDocument("SuperFOP");
PDFInfo info = doc.getInfo();
@@ -93,9 +93,9 @@ public class PDFAMetadataTestCase extends TestCase {
cal2.set(2007, Calendar.JUNE, 6, 8, 15, 59);
cal2.set(Calendar.MILLISECOND, 0);
info.setModDate(cal2.getTime());
-
+
Metadata meta = PDFMetadata.createXMPFromPDFDocument(doc);
-
+
DublinCoreAdapter dc = DublinCoreSchema.getAdapter(meta);
assertEquals("MyTitle", dc.getTitle());
assertEquals("MySubject", dc.getDescription());
diff --git a/test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java b/test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java
index eb34f70b8..f5d2f84cf 100644
--- a/test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java
+++ b/test/java/org/apache/fop/render/pdf/PDFCMapTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -27,10 +27,10 @@ import org.apache.fop.pdf.CMapBuilder;
/** Simple sanity test of the PDFCmap class */
public class PDFCMapTestCase extends TestCase {
-
+
public void testPDFCMapFillInPDF() throws Exception {
final String EOL = "\n";
- final String expected =
+ final String expected =
"%!PS-Adobe-3.0 Resource-CMap" + EOL
+"%%DocumentNeededResources: ProcSet (CIDInit)" + EOL
+"%%IncludeResource: ProcSet (CIDInit)" + EOL
@@ -60,7 +60,7 @@ public class PDFCMapTestCase extends TestCase {
+"%%EndResource" + EOL
+"%%EOF" + EOL
;
-
+
final StringWriter w = new StringWriter();
final CMapBuilder builder = new CMapBuilder(w, "test");
builder.writeCMap();
diff --git a/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java b/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java
index c9fba08c7..b3098b859 100644
--- a/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java
+++ b/test/java/org/apache/fop/render/pdf/PDFEncodingTestCase.java
@@ -59,15 +59,15 @@ public class PDFEncodingTestCase extends BasePDFTestCase {
*/
public void testPDFEncodingWithStandardFont() throws Exception {
- /* If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
+ /* If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
* ...Tm [(PDFE_TEST_MARK_2:) ( ) (This) ( ) (is) ...(acute:) ( ) (XX_\351_XX) ] TJ
* ...Tm [(PDFE_TEST_MARK_3:) ( ) (This) ( ) (is) ...(letter:) ( ) (XX_\342\352\356\364\373_XX) ] TJ
* The following array is used to look for these patterns
- */
- final String[] testPatterns = {
+ */
+ final String[] testPatterns = {
TEST_MARKER + "1", "Standard",
- TEST_MARKER + "2", "XX_\\351_XX",
- TEST_MARKER + "3", "XX_\\342\\352\\356\\364\\373_XX"
+ TEST_MARKER + "2", "XX_\\351_XX",
+ TEST_MARKER + "3", "XX_\\342\\352\\356\\364\\373_XX"
};
runTest("test-standard-font.fo", testPatterns);
@@ -78,21 +78,21 @@ public class PDFEncodingTestCase extends BasePDFTestCase {
* encoding when custom font is used.
* TODO This should be tested using PDFBox. If PDFBox can extract the text correctly,
* everything is fine. The tests here are too unstable.
- *
+ *
* @throws Exception
* checkstyle wants a comment here, even a silly one
*/
public void DISABLEDtestPDFEncodingWithCustomFont() throws Exception {
- /* If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
+ /* If the PDF encoding is correct, a text dump of the generated PDF file contains this (excerpts)
* ...Tm [(PDFE_TEST_MARK_2:) ( ) (This) ( ) (is) ...(acute:) ( ) (XX_\351_XX) ] TJ
* ...Tm [(PDFE_TEST_MARK_3:) ( ) (This) ( ) (is) ...(letter:) ( ) (XX_\342\352\356\364\373_XX) ] TJ
* The following array is used to look for these patterns
- */
- final String[] testPatterns = {
+ */
+ final String[] testPatterns = {
TEST_MARKER + "1", "(Gladiator)",
- TEST_MARKER + "2", "XX_\\351_XX",
- TEST_MARKER + "3", "XX_\\342\\352\\356\\364\\373_XX"
+ TEST_MARKER + "2", "XX_\\351_XX",
+ TEST_MARKER + "3", "XX_\\342\\352\\356\\364\\373_XX"
};
runTest("test-custom-font.fo", testPatterns);
@@ -109,7 +109,7 @@ public class PDFEncodingTestCase extends BasePDFTestCase {
/**
* Check character encodings in the generated PDF data, by reading text
* lines identified by markers and checking their content
- *
+ *
* @throws IOException
*/
private void checkEncoding(byte[] pdf, String[] testPattern)
diff --git a/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java b/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java
index 45f982b00..49b004e7c 100644
--- a/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java
+++ b/test/java/org/apache/fop/render/pdf/PDFsRGBSettingsTestCase.java
@@ -46,7 +46,7 @@ public class PDFsRGBSettingsTestCase extends BasePDFTestCase {
a.getRendererOptions().put("disable-srgb-colorspace", Boolean.TRUE);
return a;
}
-
+
/**
* Verify that the PDFRenderer complains if PDF/A or PDF/X is used when sRGB is disabled.
* @throws Exception if the test fails
@@ -60,5 +60,5 @@ public class PDFsRGBSettingsTestCase extends BasePDFTestCase {
//exception expected!
}
}
-
+
}
diff --git a/test/java/org/apache/fop/render/rtf/Bug39607TestCase.java b/test/java/org/apache/fop/render/rtf/Bug39607TestCase.java
index 950bb2e8f..a7622bc0f 100644
--- a/test/java/org/apache/fop/render/rtf/Bug39607TestCase.java
+++ b/test/java/org/apache/fop/render/rtf/Bug39607TestCase.java
@@ -51,7 +51,7 @@ public class Bug39607TestCase extends TestCase {
paragraph.newText("Testing fop - rtf module - class RtfTableRow");
paragraph.close();
- RtfTable table = section.newTable(null);
+ RtfTable table = section.newTable(null);
RtfTableRow row = table.newTableRow();
row.newTableCell(2000).newParagraph().newText("blah");
row.newTableCell(5000).newParagraph().newText("doubleBlah");
@@ -61,5 +61,5 @@ public class Bug39607TestCase extends TestCase {
doc.close();
f.flush();
}
-
+
}
diff --git a/test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java b/test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java
index 68189d8f5..502604344 100644
--- a/test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java
+++ b/test/java/org/apache/fop/render/rtf/RichTextFormatTestSuite.java
@@ -5,9 +5,9 @@
* 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.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render.rtf;
import junit.framework.Test;
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java
index 01160f493..a31859757 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/BasicLink.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java
index d7891e6a0..16460cd1c 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/CreateTestDocuments.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/DummyTableColumnsInfo.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/DummyTableColumnsInfo.java
index fab59b4ed..fe5b4b6a3 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/DummyTableColumnsInfo.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/DummyTableColumnsInfo.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java
index 537770a84..73a451818 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ExternalGraphic.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ListInTable.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ListInTable.java
index 947bbd866..adad2dfd0 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ListInTable.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ListInTable.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java
index 0a5fb73e0..63de9ba05 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/MergedTableCells.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java
index a9d005257..135dab131 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/NestedTable.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java
index c9edea0a4..17992c5d2 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/ParagraphAlignment.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleDocument.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleDocument.java
index cae40ea66..a0772203b 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleDocument.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleDocument.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleLists.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleLists.java
index ec9ef6878..a1cd0b8d5 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleLists.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleLists.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java
index 5ef1102b0..001634235 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/SimpleTable.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java
index f64ff548b..f6d1d37a8 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TestDocument.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TextAttributes.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TextAttributes.java
index da69fb332..d91eadae8 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TextAttributes.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/TextAttributes.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/Whitespace.java b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/Whitespace.java
index 4ef9ec6d5..bf79e4ba1 100644
--- a/test/java/org/apache/fop/render/rtf/rtflib/testdocs/Whitespace.java
+++ b/test/java/org/apache/fop/render/rtf/rtflib/testdocs/Whitespace.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java b/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java
index f832d0896..8d2936127 100644
--- a/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java
+++ b/test/java/org/apache/fop/text/linebreak/LineBreakStatusTest.java
@@ -5,9 +5,9 @@
* 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.
@@ -31,7 +31,7 @@ public class LineBreakStatusTest extends TestCase {
/*
* These symbols are used to indicate the break action returned
* by the paragraph breaking. Their meaning is as per Unicode
- * <a href="http://unicode.org/reports/tr14/#PairBasedImplementation">technical
+ * <a href="http://unicode.org/reports/tr14/#PairBasedImplementation">technical
* report #14</a>.
*/
private static final String BREAK_ACTION = "_%#@^!";
@@ -51,7 +51,7 @@ public class LineBreakStatusTest extends TestCase {
*/
public static Test suite() {
TestSuite suite = new TestSuite(LineBreakStatusTest.class);
-
+
return suite;
}
@@ -69,106 +69,106 @@ public class LineBreakStatusTest extends TestCase {
*/
public void testNextChar() {
System.out.println("testNextChar");
-
+
// AL -- Ordinary Alphabetic and Symbol Characters (XP)
assertTrue(testBreak(
- "Nobreak",
+ "Nobreak",
"^^^^^^^"
));
-
+
// BA -- Break Opportunity After (A)
assertTrue(testBreak(
- "Thin Space" + "\u2009" + "break",
+ "Thin Space" + "\u2009" + "break",
"^^^^^%^^^^" + "^" + "_^^^^"
));
assertTrue(testBreak(
- "Shy" + "\u00AD" + "break",
+ "Shy" + "\u00AD" + "break",
"^^^" + "^" + "_^^^^"
));
// BB -- Break opportunites before characters (B)
assertTrue(testBreak(
- "Acute Accent" + "\u00B4" + "break",
+ "Acute Accent" + "\u00B4" + "break",
"^^^^^^%^^^^^" + "_" + "^^^^^"
));
// B2 -- Break Opportunity Before and After (B/A/XP)
assertTrue(testBreak(
- "Em Dash" + "\u2014" + "break",
+ "Em Dash" + "\u2014" + "break",
"^^^%^^^" + "_" + "_^^^^"
));
assertTrue(testBreak(
- "Em Dash Dash" + "\u2014" + "\u2014" + "break",
+ "Em Dash Dash" + "\u2014" + "\u2014" + "break",
"^^^%^^^^%^^^" + "_" + "^" + "_^^^^"
));
// BK Mandatory Break (A) -- normative
assertTrue(testBreak(
- "Form Feed" + "\u000C" + "break",
+ "Form Feed" + "\u000C" + "break",
"^^^^^%^^^" + "^" + "!^^^^"
));
assertTrue(testBreak(
- "Line Separator" + "\u2028" + "break",
+ "Line Separator" + "\u2028" + "break",
"^^^^^%^^^^^^^^" + "^" + "!^^^^"
));
assertTrue(testBreak(
- "Paragraph Separator" + "\u2029" + "break",
+ "Paragraph Separator" + "\u2029" + "break",
"^^^^^^^^^^%^^^^^^^^" + "^" + "!^^^^"
));
// CB Contingent Break Opportunity (B/A) -- normative
// TODO Don't know quite what to do here
-
+
// CL -- Closing Punctuation (XB)
assertTrue(testBreak(
- "Right Parenthesis ) break",
+ "Right Parenthesis ) break",
"^^^^^^%^^^^^^^^^^^^^%^^^^"
));
-
+
// CM -- Attached Characters and Combining Marks (XB) -- normative
assertTrue(testBreak(
- "Grave Accent" + "\u0300" + " break",
+ "Grave Accent" + "\u0300" + " break",
"^^^^^^%^^^^^" + "^" + "^%^^^^"
));
-
+
// CR -- Carriage Return (A) -- normative
assertTrue(testBreak(
- "CR" + "\r" + "break",
+ "CR" + "\r" + "break",
"^^" + "^" + "!^^^^"
));
-
+
assertTrue(testBreak(
- "CRLF" + "\r\n" + "break",
+ "CRLF" + "\r\n" + "break",
"^^^^" + "^^" + "!^^^^"
));
-
+
// EX -- Exclamation / interrogation (XB)
assertTrue(testBreak(
- "EX CL ! ) break",
+ "EX CL ! ) break",
"^^^%^^^^^^%^^^^"
));
-
+
assertTrue(testBreak(
- "EX Wave Dash ! " + "\u301C" + " break",
+ "EX Wave Dash ! " + "\u301C" + " break",
"^^^%^^^^%^^^^^^" + "%" + "^_^^^^"
));
-
+
// GL -- Non-breaking ("Glue") (XB/XA) -- normative
assertTrue(testBreak(
- "No" + "\u00a0" + "break",
+ "No" + "\u00a0" + "break",
"^^" + "^" + "^^^^^"
));
-
+
assertTrue(testBreak(
- "Non" + "\u2011" + " Hyphen",
+ "Non" + "\u2011" + " Hyphen",
"^^^" + "^" + "^%^^^^^"
));
-
+
// H2 -- Hangul LVT Syllable (B/A)
// TODO
@@ -177,40 +177,40 @@ public class LineBreakStatusTest extends TestCase {
// HY -- Hyphen Minus
assertTrue(testBreak(
- "Normal-Hyphen",
+ "Normal-Hyphen",
"^^^^^^^_^^^^^"
));
assertTrue(testBreak(
- "Normal - Hyphen",
+ "Normal - Hyphen",
"^^^^^^^%^_^^^^^"
));
assertTrue(testBreak(
- "123-456",
+ "123-456",
"^^^^^^^"
));
assertTrue(testBreak(
- "123 - 456",
+ "123 - 456",
"^^^^%^%^^"
));
// ID -- Ideographic (B/A)
assertTrue(testBreak(
- "\u4E00" + "\u3000" + "\u4E02",
+ "\u4E00" + "\u3000" + "\u4E02",
"^" + "_" + "_"
));
// IN -- Inseperable characters (XP)
assertTrue(testBreak(
- "IN " + "\u2024" + "\u2025" + "\u2026",
+ "IN " + "\u2024" + "\u2025" + "\u2026",
"^^^" + "%" + "^" + "^"
));
// IS -- Numeric Separator (Infix) (XB)
assertTrue(testBreak(
- "123,456.00 12:59",
+ "123,456.00 12:59",
"^^^^^^^^^^^%^^^^"
));
@@ -225,13 +225,13 @@ public class LineBreakStatusTest extends TestCase {
// LF -- Line Feed (A) -- normative
assertTrue(testBreak(
- "Simple" + "\n" + "\n" + "break",
+ "Simple" + "\n" + "\n" + "break",
"^^^^^^" + "^" + "!" + "!^^^^"
));
// NL -- Next Line (A) -- normative
assertTrue(testBreak(
- "NL" + "\u0085" + "break",
+ "NL" + "\u0085" + "break",
"^^" + "^" + "!^^^^"
));
@@ -243,80 +243,80 @@ public class LineBreakStatusTest extends TestCase {
// OP -- Opening Punctuation (XA)
assertTrue(testBreak(
- "[ Bracket ( Parenthesis",
+ "[ Bracket ( Parenthesis",
"^^^^^^^^^^%^^^^^^^^^^^^"
));
-
+
// PO -- Postfix (Numeric) (XB)
assertTrue(testBreak(
- "(12.00)%",
+ "(12.00)%",
"^^^^^^^^"
));
// PR -- Prefix (Numeric) (XA)
assertTrue(testBreak(
- "$1000.00",
+ "$1000.00",
"^^^^^^^^"
));
// QU -- Ambiguous Quotation (XB/XA)
assertTrue(testBreak(
- "'In Quotes'",
+ "'In Quotes'",
"^^^^%^^^^^^"
));
assertTrue(testBreak(
- "' (In Quotes) '",
+ "' (In Quotes) '",
"^^^^^^%^^^^^^^%"
));
// SA -- Complex-context Dependent Characters (South East Asian) (P)
// TODO
-
+
// SP -- Space (A) -- normative
assertTrue(testBreak(
- "Simple break",
+ "Simple break",
"^^^^^^^%^^^^"
));
assertTrue(testBreak(
- "Simple break2",
+ "Simple break2",
"^^^^^^^^^^%^^^^^"
));
// SY -- Symbols Allowing Break After (A)
assertTrue(testBreak(
- "http://xmlgraphics.apache.org/fop",
+ "http://xmlgraphics.apache.org/fop",
"^^^^^^^_^^^^^^^^^^^^^^^^^^^^^^_^^"
));
assertTrue(testBreak(
- "1/2 31/10/2005",
+ "1/2 31/10/2005",
"^^^^%^^^^^^^^^"
));
// WJ -- Word Joiner (XA/XB) -- (normative)
assertTrue(testBreak(
- "http://" + "\u2060" + "xmlgraphics.apache.org/" + "\uFEFF" + "fop",
+ "http://" + "\u2060" + "xmlgraphics.apache.org/" + "\uFEFF" + "fop",
"^^^^^^^" + "^" + "^^^^^^^^^^^^^^^^^^^^^^^" + "^" + "^^^"
));
assertTrue(testBreak(
- "Simple " + "\u2060" + "break",
+ "Simple " + "\u2060" + "break",
"^^^^^^^" + "^" + "^^^^^"
));
assertTrue(testBreak(
- "Simple" + "\u200B" + "\u2060" + "break",
+ "Simple" + "\u200B" + "\u2060" + "break",
"^^^^^^" + "^" + "_" + "^^^^^"
));
// XX -- Unknown (XP)
// TODO
-
+
// ZW -- Zero Width Space (A) -- (normative)
assertTrue(testBreak(
- "Simple" + "\u200B" + "break",
+ "Simple" + "\u200B" + "break",
"^^^^^^" + "^" + "_^^^^"
));
@@ -340,8 +340,8 @@ public class LineBreakStatusTest extends TestCase {
if (BREAK_ACTION.charAt(breakAction) != breakActions.charAt(i)) {
System.err.println(paragraph);
System.err.println(breakActions);
- System.err.println("pos = " + i
- + " expected '" + breakActions.charAt(i)
+ System.err.println("pos = " + i
+ + " expected '" + breakActions.charAt(i)
+ "' got '" + BREAK_ACTION.charAt(breakAction) + "'");
result = false;
}
diff --git a/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java b/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java
index 22b8f73f3..31ad950c7 100644
--- a/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java
+++ b/test/java/org/apache/fop/text/linebreak/LineBreakUtilsTest.java
@@ -1,13 +1,13 @@
-/*
+/*
* 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.
@@ -23,7 +23,7 @@ import junit.framework.TestCase;
/**
* TODO add javadoc
- *
+ *
*
*/
public class LineBreakUtilsTest extends TestCase {
diff --git a/test/java/org/apache/fop/threading/FOPTestbed.java b/test/java/org/apache/fop/threading/FOPTestbed.java
index 875c04617..7ced868c4 100644
--- a/test/java/org/apache/fop/threading/FOPTestbed.java
+++ b/test/java/org/apache/fop/threading/FOPTestbed.java
@@ -5,9 +5,9 @@
* 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.
@@ -46,7 +46,7 @@ import org.apache.commons.io.IOUtils;
* Testbed for multi-threading tests. The class can run a configurable set of task a number of
* times in a configurable number of threads to easily reproduce multi-threading issues.
*/
-public class FOPTestbed extends AbstractLogEnabled
+public class FOPTestbed extends AbstractLogEnabled
implements Configurable, Initializable {
private int repeat;
@@ -57,7 +57,7 @@ public class FOPTestbed extends AbstractLogEnabled
private FOProcessor foprocessor;
private int counter = 0;
-
+
/** {@inheritDoc} */
public void configure(Configuration configuration) throws ConfigurationException {
this.threads = configuration.getChild("threads").getValueAsInteger(10);
@@ -83,7 +83,7 @@ public class FOPTestbed extends AbstractLogEnabled
getLogger().info("Starting stress test...");
long start = System.currentTimeMillis();
this.counter = 0;
-
+
//Initialize threads
List threadList = new java.util.LinkedList();
for (int ti = 0; ti < this.threads; ti++) {
@@ -92,13 +92,13 @@ public class FOPTestbed extends AbstractLogEnabled
Thread thread = new Thread(runner);
threadList.add(thread);
}
-
+
//Start threads
Iterator i = threadList.iterator();
while (i.hasNext()) {
((Thread)i.next()).start();
}
-
+
//Wait for threads to end
while (threadList.size() > 0) {
Thread t = (Thread)threadList.get(0);
@@ -116,7 +116,7 @@ public class FOPTestbed extends AbstractLogEnabled
}
private class TaskRunner extends AbstractLogEnabled implements Runnable {
-
+
public void run() {
try {
for (int r = 0; r < repeat; r++) {
@@ -134,14 +134,14 @@ public class FOPTestbed extends AbstractLogEnabled
}
}
-
+
/**
* Creates a new FOProcessor.
* @return the newly created instance
*/
public FOProcessor createFOProcessor() {
try {
- Class clazz = Class.forName(this.fopCfg.getAttribute("class",
+ Class clazz = Class.forName(this.fopCfg.getAttribute("class",
"org.apache.fop.threading.FOProcessorImpl"));
FOProcessor fop = (FOProcessor)clazz.newInstance();
ContainerUtil.enableLogging(fop, getLogger());
@@ -152,7 +152,7 @@ public class FOPTestbed extends AbstractLogEnabled
throw new CascadingRuntimeException("Error creating FO Processor", e);
}
}
-
+
private class TaskDef {
private String fo;
@@ -228,7 +228,7 @@ public class FOPTestbed extends AbstractLogEnabled
try {
InputStream in;
Templates templates;
-
+
if (def.getFO() != null) {
in = new java.io.FileInputStream(new File(def.getFO()));
templates = null;
diff --git a/test/java/org/apache/fop/threading/FOProcessor.java b/test/java/org/apache/fop/threading/FOProcessor.java
index a6b3dd7ec..05c8f6fe1 100644
--- a/test/java/org/apache/fop/threading/FOProcessor.java
+++ b/test/java/org/apache/fop/threading/FOProcessor.java
@@ -5,9 +5,9 @@
* 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.
diff --git a/test/java/org/apache/fop/threading/FOProcessorImpl.java b/test/java/org/apache/fop/threading/FOProcessorImpl.java
index e913e9a79..4ba7da658 100644
--- a/test/java/org/apache/fop/threading/FOProcessorImpl.java
+++ b/test/java/org/apache/fop/threading/FOProcessorImpl.java
@@ -5,9 +5,9 @@
* 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.
@@ -71,7 +71,7 @@ public class FOProcessorImpl extends AbstractLogEnabled
}
/** {@inheritDoc} */
- public void process(InputStream in, Templates templates, OutputStream out)
+ public void process(InputStream in, Templates templates, OutputStream out)
throws org.apache.fop.apps.FOPException, java.io.IOException {
FOUserAgent foUserAgent = fopFactory.newFOUserAgent();
Fop fop = fopFactory.newFop(this.mime, foUserAgent, out);
diff --git a/test/java/org/apache/fop/threading/Main.java b/test/java/org/apache/fop/threading/Main.java
index e7f011ada..8363898ae 100644
--- a/test/java/org/apache/fop/threading/Main.java
+++ b/test/java/org/apache/fop/threading/Main.java
@@ -5,9 +5,9 @@
* 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.
@@ -39,7 +39,7 @@ public class Main {
System.out.print("Press return to continue...");
in.readLine();
}
-
+
/**
* Main method.
* @param args the command-line arguments
@@ -50,21 +50,21 @@ public class Main {
File cfgFile = new File(args[0]);
DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
Configuration cfg = builder.buildFromFile(cfgFile);
-
+
boolean doPrompt = cfg.getAttributeAsBoolean("prompt", false);
if (doPrompt) {
prompt();
}
-
+
//Setup testbed
FOPTestbed testbed = new FOPTestbed();
ContainerUtil.enableLogging(testbed, new ConsoleLogger(ConsoleLogger.LEVEL_INFO));
ContainerUtil.configure(testbed, cfg);
ContainerUtil.initialize(testbed);
-
+
//Start tests
testbed.doStressTest();
-
+
System.exit(0);
} catch (Exception e) {
System.err.println(ExceptionUtil.printStackTrace(e));
diff --git a/test/java/org/apache/fop/traits/BorderPropsTestCase.java b/test/java/org/apache/fop/traits/BorderPropsTestCase.java
index 2dea98b13..6aea38512 100644
--- a/test/java/org/apache/fop/traits/BorderPropsTestCase.java
+++ b/test/java/org/apache/fop/traits/BorderPropsTestCase.java
@@ -39,18 +39,18 @@ public class BorderPropsTestCase extends TestCase {
Color col = new Color(1.0f, 1.0f, 0.5f, 1.0f);
//Normalize: Avoid false alarms due to color conversion (rounding)
col = ColorUtil.parseColorString(null, ColorUtil.colorToString(col));
-
- BorderProps b1 = new BorderProps(Constants.EN_DOUBLE, 1250,
+
+ BorderProps b1 = new BorderProps(Constants.EN_DOUBLE, 1250,
col, BorderProps.COLLAPSE_OUTER);
String ser = b1.toString();
BorderProps b2 = BorderProps.valueOf(null, ser);
assertEquals(b1, b2);
- b1 = new BorderProps(Constants.EN_INSET, 9999,
+ b1 = new BorderProps(Constants.EN_INSET, 9999,
col, BorderProps.SEPARATE);
ser = b1.toString();
b2 = BorderProps.valueOf(null, ser);
assertEquals(b1, b2);
}
-
+
}
diff --git a/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java b/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java
index c0e003573..3d7e72d87 100644
--- a/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java
+++ b/test/java/org/apache/fop/util/AdvancedMessageFormatTestCase.java
@@ -36,7 +36,7 @@ public class AdvancedMessageFormatTestCase extends TestCase {
public void testFormatting() throws Exception {
String msg;
AdvancedMessageFormat format;
-
+
String pattern
= "Element \"{elementName}\" is missing[ required property \"{propertyName}\"]!";
format = new AdvancedMessageFormat(pattern);
@@ -45,14 +45,14 @@ public class AdvancedMessageFormatTestCase extends TestCase {
params.put("node", new Object());
params.put("elementName", "fo:external-graphic");
params.put("propertyName", "src");
-
+
msg = format.format(params);
assertEquals("Element \"fo:external-graphic\" is missing required property \"src\"!", msg);
-
+
params.remove("propertyName");
msg = format.format(params);
assertEquals("Element \"fo:external-graphic\" is missing!", msg);
-
+
pattern
= "Testing \\{escaped \\[characters\\], now a normal field {elementName}!";
format = new AdvancedMessageFormat(pattern);
@@ -61,11 +61,11 @@ public class AdvancedMessageFormatTestCase extends TestCase {
pattern = "Multi-conditional: [case1: {var1}|case2: {var2}|case3: {var3}]";
format = new AdvancedMessageFormat(pattern);
-
+
params = new java.util.HashMap();
msg = format.format(params);
assertEquals("Multi-conditional: ", msg);
-
+
params.put("var3", "value3");
msg = format.format(params);
assertEquals("Multi-conditional: case3: value3", msg);
@@ -73,11 +73,11 @@ public class AdvancedMessageFormatTestCase extends TestCase {
msg = format.format(params);
assertEquals("Multi-conditional: case1: value1", msg);
}
-
+
public void testObjectFormatting() throws Exception {
String msg;
AdvancedMessageFormat format;
-
+
String pattern
= "Here's a Locator: {locator}";
format = new AdvancedMessageFormat(pattern);
@@ -87,15 +87,15 @@ public class AdvancedMessageFormatTestCase extends TestCase {
loc.setColumnNumber(7);
loc.setLineNumber(12);
params.put("locator", loc);
-
+
msg = format.format(params);
assertEquals("Here\'s a Locator: 12:7", msg);
}
-
+
public void testIfFormatting() throws Exception {
String msg;
AdvancedMessageFormat format;
-
+
format = new AdvancedMessageFormat("You are{isBad,if, not} nice!");
Map params = new java.util.HashMap();
@@ -138,11 +138,11 @@ public class AdvancedMessageFormatTestCase extends TestCase {
msg = format.format(params);
assertEquals("You are very, very nice!", msg);
}
-
+
public void testEqualsFormatting() throws Exception {
String msg;
AdvancedMessageFormat format;
-
+
format = new AdvancedMessageFormat(
"Error{severity,equals,EventSeverity:FATAL,,\nSome explanation!}");
@@ -156,11 +156,11 @@ public class AdvancedMessageFormatTestCase extends TestCase {
msg = format.format(params);
assertEquals("Error\nSome explanation!", msg);
}
-
+
public void testChoiceFormatting() throws Exception {
String msg;
AdvancedMessageFormat format;
-
+
format = new AdvancedMessageFormat(
"You have {amount,choice,0#nothing|0<{amount} bucks|100<more than enough}.");
@@ -179,5 +179,5 @@ public class AdvancedMessageFormatTestCase extends TestCase {
assertEquals("You have more than enough.", msg);
}
-
+
}
diff --git a/test/java/org/apache/fop/util/ColorUtilTestCase.java b/test/java/org/apache/fop/util/ColorUtilTestCase.java
index bdeca4379..bdc57f86a 100644
--- a/test/java/org/apache/fop/util/ColorUtilTestCase.java
+++ b/test/java/org/apache/fop/util/ColorUtilTestCase.java
@@ -39,16 +39,16 @@ public class ColorUtilTestCase extends TestCase {
public void testSerialization() throws Exception {
Color col = new Color(1.0f, 1.0f, 0.5f, 1.0f);
String s = ColorUtil.colorToString(col);
-
- //This is what the old color spit out. Now it is 80 due to rounding
+
+ //This is what the old color spit out. Now it is 80 due to rounding
//assertEquals("#ffff7f", s);
assertEquals("#ffff80", s);
-
+
col = new Color(1.0f, 0.0f, 0.0f, 0.8f);
s = ColorUtil.colorToString(col);
assertEquals("#ff0000cc", s);
}
-
+
/**
* Test deserialization from String.
* @throws Exception if an error occurs
@@ -66,7 +66,7 @@ public class ColorUtilTestCase extends TestCase {
assertEquals(0, col.getBlue());
assertEquals(204, col.getAlpha());
}
-
+
/**
* Test equals().
* @throws Exception if an error occurs
@@ -76,7 +76,7 @@ public class ColorUtilTestCase extends TestCase {
Color col2 = ColorUtil.parseColorString(null, "#ff0000cc");
assertEquals(col1, col2);
}
-
+
/**
* Tests the rgb() function.
* @throws Exception if an error occurs
@@ -85,7 +85,7 @@ public class ColorUtilTestCase extends TestCase {
FopFactory fopFactory = FopFactory.newInstance();
FOUserAgent ua = fopFactory.newFOUserAgent();
Color colActual;
-
+
colActual = ColorUtil.parseColorString(ua, "rgb(255, 40, 0)");
assertEquals(255, colActual.getRed());
assertEquals(40, colActual.getGreen());
@@ -93,7 +93,7 @@ public class ColorUtilTestCase extends TestCase {
assertEquals(255, colActual.getAlpha());
assertEquals(ColorSpace.getInstance(ColorSpace.CS_sRGB), colActual.getColorSpace());
}
-
+
/**
* Tests the fop-rgb-icc() function.
* @throws Exception if an error occurs
@@ -103,11 +103,11 @@ public class ColorUtilTestCase extends TestCase {
ColorSpace cs = fopFactory.getColorSpace(null,
"src/java/org/apache/fop/pdf/sRGB Color Space Profile.icm");
assertNotNull(cs);
-
-
+
+
FOUserAgent ua = fopFactory.newFOUserAgent();
ColorExt colActual;
-
+
//fop-rgb-icc() is used instead of rgb-icc() inside FOP!
String colSpec = "fop-rgb-icc(1.0,0.0,0.0,sRGBAlt,"
+ "\"src/java/org/apache/fop/pdf/sRGB Color Space Profile.icm\",1.0,0.0,0.0)";
@@ -125,7 +125,7 @@ public class ColorUtilTestCase extends TestCase {
assertEquals(1f, comps[0], 0);
assertEquals(0f, comps[1], 0);
assertEquals(0f, comps[2], 0);
-
+
assertEquals(colSpec, ColorUtil.colorToString(colActual));
colSpec = "fop-rgb-icc(1.0,0.5,0.0,blah,"
@@ -133,7 +133,7 @@ public class ColorUtilTestCase extends TestCase {
Color colFallback = ColorUtil.parseColorString(ua, colSpec);
assertEquals(new Color(1.0f, 0.5f, 0.0f), colFallback);
}
-
+
/**
* Tests the cmyk() function.
* @throws Exception if an error occurs
@@ -141,7 +141,7 @@ public class ColorUtilTestCase extends TestCase {
public void testCMYK() throws Exception {
ColorExt colActual;
String colSpec;
-
+
colSpec = "cmyk(0.0, 0.0, 1.0, 0.0)";
colActual = (ColorExt)ColorUtil.parseColorString(null, colSpec);
assertEquals(255, colActual.getRed());
@@ -155,7 +155,7 @@ public class ColorUtilTestCase extends TestCase {
assertEquals(1f, comps[2], 0);
assertEquals(0f, comps[3], 0);
assertEquals("cmyk(0.0,0.0,1.0,0.0)", ColorUtil.colorToString(colActual));
-
+
colSpec = "cmyk(0.0274, 0.2196, 0.3216, 0.0)";
colActual = (ColorExt)ColorUtil.parseColorString(null, colSpec);
assertEquals(248, colActual.getRed());
@@ -169,5 +169,5 @@ public class ColorUtilTestCase extends TestCase {
assertEquals(0f, comps[3], 0);
assertEquals("cmyk(0.0274,0.2196,0.3216,0.0)", ColorUtil.colorToString(colActual));
}
-
+
}
diff --git a/test/java/org/apache/fop/util/ConsoleEventListenerForTests.java b/test/java/org/apache/fop/util/ConsoleEventListenerForTests.java
index 9e8a57285..b2bfdc99a 100644
--- a/test/java/org/apache/fop/util/ConsoleEventListenerForTests.java
+++ b/test/java/org/apache/fop/util/ConsoleEventListenerForTests.java
@@ -28,11 +28,11 @@ import org.apache.fop.events.model.EventSeverity;
public class ConsoleEventListenerForTests implements EventListener {
private String name;
-
+
public ConsoleEventListenerForTests(String name) {
this.name = name;
}
-
+
/** {@inheritDoc} */
public void processEvent(Event event) {
if (this.name != null) {
diff --git a/test/java/org/apache/fop/util/DataURIResolverTestCase.java b/test/java/org/apache/fop/util/DataURIResolverTestCase.java
index 133d4fcd1..631b8dac1 100644
--- a/test/java/org/apache/fop/util/DataURIResolverTestCase.java
+++ b/test/java/org/apache/fop/util/DataURIResolverTestCase.java
@@ -5,9 +5,9 @@
* 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.
@@ -35,7 +35,7 @@ import junit.framework.TestCase;
public class DataURIResolverTestCase extends TestCase {
private static final byte[] TESTDATA = new byte[] {0, 1, 2, 3, 4, 5};
-
+
/**
* Tests DataURLUtil.
* @throws Exception if an error occurs
@@ -56,14 +56,14 @@ public class DataURIResolverTestCase extends TestCase {
public void testNonMatchingContract() throws Exception {
URIResolver resolver = new DataURIResolver();
Source src;
-
+
src = resolver.resolve("http://xmlgraphics.apache.org/fop/index.html", null);
assertNull(src);
src = resolver.resolve("index.html", "http://xmlgraphics.apache.org/fop/");
assertNull(src);
}
-
+
private static boolean byteCmp(byte[] src, int srcOffset, byte[] cmp) {
for (int i = 0, c = cmp.length; i < c; i++) {
if (src[srcOffset + i] != cmp[i]) {
@@ -80,7 +80,7 @@ public class DataURIResolverTestCase extends TestCase {
public void testDataURLHandling() throws Exception {
URIResolver resolver = new DataURIResolver();
Source src;
-
+
src = resolver.resolve("data:;base64,AAECAwQF", null);
assertNotNull(src);
StreamSource streamSource = (StreamSource)src;
@@ -112,5 +112,5 @@ public class DataURIResolverTestCase extends TestCase {
assertEquals("A brief note", text);
*/
}
-
+
}
diff --git a/test/java/org/apache/fop/util/DigestFilter.java b/test/java/org/apache/fop/util/DigestFilter.java
index 6c2f353d4..0384b42df 100644
--- a/test/java/org/apache/fop/util/DigestFilter.java
+++ b/test/java/org/apache/fop/util/DigestFilter.java
@@ -5,9 +5,9 @@
* 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.
@@ -38,7 +38,7 @@ import org.xml.sax.helpers.XMLFilterImpl;
* If the filter is namespace aware, the URI and local name for
* each element is digested, otherwise the QName. Attributes are
* sorted before the name-value pairs are digested.
- *
+ *
*/
public class DigestFilter extends XMLFilterImpl {
diff --git a/test/java/org/apache/fop/util/ElementListUtilsTestCase.java b/test/java/org/apache/fop/util/ElementListUtilsTestCase.java
index 1ea0ac02d..d41e9f94f 100644
--- a/test/java/org/apache/fop/util/ElementListUtilsTestCase.java
+++ b/test/java/org/apache/fop/util/ElementListUtilsTestCase.java
@@ -50,16 +50,16 @@ public class ElementListUtilsTestCase extends TestCase {
lst.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, null, false));
lst.add(new KnuthGlue(0, Integer.MAX_VALUE, 0, null, false));
lst.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false, null, false));
-
+
boolean res = ElementListUtils.removeLegalBreaks(lst, 9000);
-
+
assertFalse(res);
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getP());
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getP());
assertEquals(0, ((KnuthPenalty)lst.get(5)).getP());
}
-
+
/**
* Tests ElementListUtils.removeLegalBreaks().
* @throws Exception if the test fails
@@ -76,11 +76,11 @@ public class ElementListUtilsTestCase extends TestCase {
lst.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, null, false));
lst.add(new KnuthGlue(0, Integer.MAX_VALUE, 0, null, false));
lst.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false, null, false));
-
+
boolean res = ElementListUtils.removeLegalBreaks(lst, 9000);
-
+
assertFalse(res);
-
+
//Must insert an INFINITE penalty
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(1)).getP());
assertEquals(0, ((KnuthGlue)lst.get(2)).getW());
@@ -88,7 +88,7 @@ public class ElementListUtilsTestCase extends TestCase {
assertEquals(0, ((KnuthGlue)lst.get(5)).getW());
assertEquals(0, ((KnuthGlue)lst.get(7)).getW());
}
-
+
/**
* Tests ElementListUtils.removeLegalBreaksFromEnd().
* @throws Exception if the test fails
@@ -105,16 +105,16 @@ public class ElementListUtilsTestCase extends TestCase {
lst.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, null, false));
lst.add(new KnuthGlue(0, Integer.MAX_VALUE, 0, null, false));
lst.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false, null, false));
-
+
boolean res = ElementListUtils.removeLegalBreaksFromEnd(lst, 9000);
-
+
assertFalse(res);
assertEquals(0, ((KnuthPenalty)lst.get(1)).getP());
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(3)).getP());
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getP());
}
-
+
/**
* Tests ElementListUtils.removeLegalBreaksFromEnd().
* @throws Exception if the test fails
@@ -131,9 +131,9 @@ public class ElementListUtilsTestCase extends TestCase {
lst.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, null, false));
lst.add(new KnuthGlue(0, Integer.MAX_VALUE, 0, null, false));
lst.add(new KnuthPenalty(0, -KnuthElement.INFINITE, false, null, false));
-
+
boolean res = ElementListUtils.removeLegalBreaksFromEnd(lst, 9000);
-
+
assertFalse(res);
//Must insert an INFINITE penalty
@@ -142,6 +142,6 @@ public class ElementListUtilsTestCase extends TestCase {
assertEquals(KnuthElement.INFINITE, ((KnuthPenalty)lst.get(5)).getP());
assertEquals(0, ((KnuthGlue)lst.get(6)).getW());
}
-
-
+
+
} \ No newline at end of file
diff --git a/test/java/org/apache/fop/util/PDFNumberTestCase.java b/test/java/org/apache/fop/util/PDFNumberTestCase.java
index 0602e4842..0f2fed138 100644
--- a/test/java/org/apache/fop/util/PDFNumberTestCase.java
+++ b/test/java/org/apache/fop/util/PDFNumberTestCase.java
@@ -39,14 +39,14 @@ public class PDFNumberTestCase extends TestCase {
assertEquals("0.1", PDFNumber.doubleOut(0.1f));
assertEquals("100", PDFNumber.doubleOut(100.0f));
assertEquals("100", PDFNumber.doubleOut(99.99999999999999999999999f));
-
- //You'd expect 100.123456 here but DecimalFormat uses the BigDecimal.ROUND_HALF_EVEN
+
+ //You'd expect 100.123456 here but DecimalFormat uses the BigDecimal.ROUND_HALF_EVEN
//strategy. I don't know if that's a problem. The strange thing testDoubleOut2
//seems to return the normally expected value. Weird.
assertEquals("100.123459", PDFNumber.doubleOut(100.12345611111111f));
assertEquals("-100.123459", PDFNumber.doubleOut(-100.12345611111111f));
}
-
+
/**
* Tests PDFNumber.doubleOut().
* @throws Exception if the test fails
@@ -61,7 +61,7 @@ public class PDFNumberTestCase extends TestCase {
assertEquals("100.1234", PDFNumber.doubleOut(100.12341111111111f, 4));
assertEquals("-100.1234", PDFNumber.doubleOut(-100.12341111111111f, 4));
}
-
+
/**
* Tests PDFNumber.doubleOut().
* @throws Exception if the test fails
@@ -74,7 +74,7 @@ public class PDFNumberTestCase extends TestCase {
assertEquals("100", PDFNumber.doubleOut(100.1234f, 0));
assertEquals("-100", PDFNumber.doubleOut(-100.1234f, 0));
}
-
+
/**
* Tests PDFNumber.doubleOut(). Special cases (former bugs).
* @throws Exception if the test fails
@@ -85,7 +85,7 @@ public class PDFNumberTestCase extends TestCase {
assertEquals("0", PDFNumber.doubleOut(d, 4));
assertEquals("0.00000572", PDFNumber.doubleOut(d, 8));
}
-
+
/**
* Tests PDFNumber.doubleOut(). Tests for wrong parameters.
* @throws Exception if the test fails
@@ -110,5 +110,5 @@ public class PDFNumberTestCase extends TestCase {
//we want that
}
}
-
+
}
diff --git a/test/java/org/apache/fop/util/UnitConvTestCase.java b/test/java/org/apache/fop/util/UnitConvTestCase.java
index 6e4432d15..a10619199 100644
--- a/test/java/org/apache/fop/util/UnitConvTestCase.java
+++ b/test/java/org/apache/fop/util/UnitConvTestCase.java
@@ -38,9 +38,9 @@ public class UnitConvTestCase extends TestCase {
assertEquals("pt2mm", 297, UnitConv.pt2mm(841.890), 0.0001);
assertEquals("in2mpt", 792000, UnitConv.in2mpt(11.0), 1.0 / 2); //height of a letter page
assertEquals("mpt2in", 11.0, UnitConv.mpt2in(792000), 0.01 / 2); //height of a letter page
-
+
assertEquals("mm2px/72dpi", 841.8897764234434, UnitConv.mm2px(297.0, 72), 0);
assertEquals("mm2px/300dpi", 3507.8740684310146, UnitConv.mm2px(297.0, 300), 0);
}
-
+
} \ No newline at end of file
diff --git a/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java b/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java
index a1ced32a2..bc201bfae 100644
--- a/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java
+++ b/test/java/org/apache/fop/util/XMLResourceBundleTestCase.java
@@ -35,7 +35,7 @@ public class XMLResourceBundleTestCase extends TestCase {
getClass().getName(), Locale.ENGLISH, getClass().getClassLoader());
ResourceBundle bundleDE = XMLResourceBundle.getXMLBundle(
getClass().getName(), Locale.GERMAN, getClass().getClassLoader());
-
+
assertEquals("", bundle.getLocale().getLanguage());
assertEquals("de", bundleDE.getLocale().getLanguage());
@@ -46,7 +46,7 @@ public class XMLResourceBundleTestCase extends TestCase {
assertEquals("Untranslatable", bundle.getString("untranslatable"));
assertEquals("Untranslatable", bundleDE.getString("untranslatable"));
}
-
+
public void testWithInvalidFile() throws Exception {
try {
ResourceBundle bundle = XMLResourceBundle.getXMLBundle(
@@ -56,5 +56,5 @@ public class XMLResourceBundleTestCase extends TestCase {
//expected
}
}
-
+
}
diff --git a/test/java/org/apache/fop/visual/AbstractBitmapProducer.java b/test/java/org/apache/fop/visual/AbstractBitmapProducer.java
index 4093f4d94..44061e082 100644
--- a/test/java/org/apache/fop/visual/AbstractBitmapProducer.java
+++ b/test/java/org/apache/fop/visual/AbstractBitmapProducer.java
@@ -32,14 +32,14 @@ public abstract class AbstractBitmapProducer implements BitmapProducer {
/** Logger */
protected static Log log = LogFactory.getLog(AbstractBitmapProducer.class);
-
+
/**
* Returns a new JAXP Transformer based on information in the ProducerContext.
* @param context context information for the process
* @return a new Transformer instance (identity or set up with a stylesheet)
* @throws TransformerConfigurationException in case creating the Transformer fails.
*/
- protected Transformer getTransformer(ProducerContext context)
+ protected Transformer getTransformer(ProducerContext context)
throws TransformerConfigurationException {
if (context.getTemplates() != null) {
return context.getTemplates().newTransformer();
@@ -47,5 +47,5 @@ public abstract class AbstractBitmapProducer implements BitmapProducer {
return context.getTransformerFactory().newTransformer();
}
}
-
+
}
diff --git a/test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java b/test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java
index 216a4466e..0f842468f 100644
--- a/test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java
+++ b/test/java/org/apache/fop/visual/AbstractPSPDFBitmapProducer.java
@@ -40,7 +40,7 @@ import org.apache.fop.apps.Fop;
import org.apache.fop.apps.FopFactory;
/**
- * BitmapProducer implementation that uses the PS or PDF renderer and an external converter
+ * BitmapProducer implementation that uses the PS or PDF renderer and an external converter
* to create bitmaps.
* <p>
* Here's what the configuration element looks like for the class:
@@ -52,7 +52,7 @@ import org.apache.fop.apps.FopFactory;
* </producer>
* </pre>
* <p>
- * You will notice the three parameters in curly braces (java.util.MessageFormat style) to the
+ * You will notice the three parameters in curly braces (java.util.MessageFormat style) to the
* converter call:
* <ul>
* <li>0: the input file
@@ -62,15 +62,15 @@ import org.apache.fop.apps.FopFactory;
* <p>
* The "delete-temp-files" element is optional and defaults to true.
*/
-public abstract class AbstractPSPDFBitmapProducer extends AbstractBitmapProducer
+public abstract class AbstractPSPDFBitmapProducer extends AbstractBitmapProducer
implements Configurable {
// configure fopFactory as desired
private FopFactory fopFactory = FopFactory.newInstance();
-
+
private String converter;
private boolean deleteTempFiles;
-
+
/** @see org.apache.avalon.framework.configuration.Configurable */
public void configure(Configuration cfg) throws ConfigurationException {
this.converter = cfg.getChild("converter").getValue();
@@ -86,9 +86,9 @@ public abstract class AbstractPSPDFBitmapProducer extends AbstractBitmapProducer
*/
public void convert(File inFile, File outFile, ProducerContext context) throws IOException {
outFile.delete();
-
+
//Build command-line
- String cmd = MessageFormat.format(converter,
+ String cmd = MessageFormat.format(converter,
new Object[] {inFile.toString(), outFile.toString(),
Integer.toString(context.getTargetResolution())});
ConvertUtils.convert(cmd, null, null, log);
@@ -97,17 +97,17 @@ public abstract class AbstractPSPDFBitmapProducer extends AbstractBitmapProducer
throw new IOException("The target file has not been generated");
}
}
-
+
/**
- * @return the native extension generated by the output format, ex. "ps" or "pdf".
+ * @return the native extension generated by the output format, ex. "ps" or "pdf".
*/
protected abstract String getTargetExtension();
-
+
/**
* @return the output format for the FOP renderer, i.e. a MIME type.
*/
protected abstract String getTargetFormat();
-
+
/** @see org.apache.fop.visual.BitmapProducer */
public BufferedImage produce(File src, ProducerContext context) {
try {
@@ -115,9 +115,9 @@ public abstract class AbstractPSPDFBitmapProducer extends AbstractBitmapProducer
userAgent.setTargetResolution(context.getTargetResolution());
userAgent.setBaseURL(src.getParentFile().toURL().toString());
- File tempOut = new File(context.getTargetDir(),
+ File tempOut = new File(context.getTargetDir(),
src.getName() + "." + getTargetExtension());
- File tempPNG = new File(context.getTargetDir(),
+ File tempPNG = new File(context.getTargetDir(),
src.getName() + "." + getTargetExtension() + ".png");
try {
OutputStream out = new FileOutputStream(tempOut);
@@ -125,13 +125,13 @@ public abstract class AbstractPSPDFBitmapProducer extends AbstractBitmapProducer
try {
Fop fop = fopFactory.newFop(getTargetFormat(), userAgent, out);
SAXResult res = new SAXResult(fop.getDefaultHandler());
-
+
Transformer transformer = getTransformer(context);
transformer.transform(new StreamSource(src), res);
} finally {
IOUtils.closeQuietly(out);
}
-
+
convert(tempOut, tempPNG, context);
BufferedImage img = BitmapComparator.getImage(tempPNG);
return img;
diff --git a/test/java/org/apache/fop/visual/AbstractRedirectorLineHandler.java b/test/java/org/apache/fop/visual/AbstractRedirectorLineHandler.java
index 5b397c5f9..344d3199e 100644
--- a/test/java/org/apache/fop/visual/AbstractRedirectorLineHandler.java
+++ b/test/java/org/apache/fop/visual/AbstractRedirectorLineHandler.java
@@ -23,7 +23,7 @@ package org.apache.fop.visual;
* Abstract base implementation for a RedirectorLineHandler which provides empty notifyStart()
* and notifyEnd() methods.
*/
-public abstract class AbstractRedirectorLineHandler
+public abstract class AbstractRedirectorLineHandler
implements RedirectorLineHandler {
/** @see org.apache.fop.visual.RedirectorLineHandler#notifyStart() */
diff --git a/test/java/org/apache/fop/visual/BatchDiffer.java b/test/java/org/apache/fop/visual/BatchDiffer.java
index c2faba37b..e0c78135e 100644
--- a/test/java/org/apache/fop/visual/BatchDiffer.java
+++ b/test/java/org/apache/fop/visual/BatchDiffer.java
@@ -89,7 +89,7 @@ import org.apache.fop.layoutengine.LayoutEngineTestSuite;
* source files with. Default: no stylesheet, identity transform.
* <p>
* The "producers" element contains a list of producer implementations with configuration.
- * The "classname" attribute specifies the fully qualified class name for the implementation.
+ * The "classname" attribute specifies the fully qualified class name for the implementation.
*/
public class BatchDiffer {
@@ -114,7 +114,7 @@ public class BatchDiffer {
* @throws SAXException In case of a problem during SAX processing
* @throws IOException In case of a I/O problem
*/
- public void runBatch(File cfgFile)
+ public void runBatch(File cfgFile)
throws ConfigurationException, SAXException, IOException {
DefaultConfigurationBuilder cfgBuilder = new DefaultConfigurationBuilder();
Configuration cfg = cfgBuilder.buildFromFile(cfgFile);
@@ -141,7 +141,7 @@ public class BatchDiffer {
}
}
BitmapProducer[] producers = getProducers(cfg.getChild("producers"));
-
+
//Set up directories
File srcDir = new File(cfg.getChild("source-directory").getValue());
if (!srcDir.exists()) {
@@ -153,12 +153,12 @@ public class BatchDiffer {
throw new RuntimeException("target-directory is invalid: " + targetDir);
}
context.setTargetDir(targetDir);
-
+
boolean stopOnException = cfg.getChild("stop-on-exception").getValueAsBoolean(true);
final boolean createDiffs = cfg.getChild("create-diffs").getValueAsBoolean(true);
-
+
//RUN!
-
+
IOFileFilter filter = new SuffixFileFilter(new String[] {".xml", ".fo"});
//Same filtering as in layout engine tests
if (cfg.getChild("filter-disabled").getValueAsBoolean(true)) {
@@ -191,10 +191,10 @@ public class BatchDiffer {
}
//Create combined image
if (bitmaps[0] == null) {
- throw new RuntimeException("First producer didn't return a bitmap for "
+ throw new RuntimeException("First producer didn't return a bitmap for "
+ f + ". Cannot continue.");
}
-
+
Runnable runnable = new Runnable() {
public void run() {
try {
@@ -226,11 +226,11 @@ public class BatchDiffer {
throw new RuntimeException("Error while configuring BatchDiffer: " + e.getMessage());
}
}
-
+
private void saveBitmaps(File targetDir, File srcFile, boolean createDiffs,
BufferedImage[] bitmaps) throws IOException {
BufferedImage combined = BitmapComparator.buildCompareImage(bitmaps);
-
+
//Save combined bitmap as PNG file
File outputFile = new File(targetDir, srcFile.getName() + "._combined.png");
ImageWriterUtil.saveAsPNG(combined, outputFile);
@@ -244,7 +244,7 @@ public class BatchDiffer {
}
}
}
-
+
private BitmapProducer[] getProducers(Configuration cfg) {
Configuration[] children = cfg.getChildren("producer");
BitmapProducer[] producers = new BitmapProducer[children.length];
@@ -260,7 +260,7 @@ public class BatchDiffer {
}
return producers;
}
-
+
/**
* Main method.
* @param args command-line arguments
@@ -278,16 +278,16 @@ public class BatchDiffer {
printUsage();
System.exit(-1);
}
-
+
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
BatchDiffer differ = new BatchDiffer();
differ.runBatch(cfgFile);
-
+
System.out.println("Regular exit...");
} catch (Exception e) {
System.out.println("Exception caught...");
e.printStackTrace();
}
}
-
+
}
diff --git a/test/java/org/apache/fop/visual/BitmapComparator.java b/test/java/org/apache/fop/visual/BitmapComparator.java
index 70a627d7e..650554f37 100644
--- a/test/java/org/apache/fop/visual/BitmapComparator.java
+++ b/test/java/org/apache/fop/visual/BitmapComparator.java
@@ -39,8 +39,8 @@ import org.apache.commons.io.IOUtils;
/**
* Helper class to visually compare two bitmap images.
* <p>
- * This class was created by extracting reusable code from
- * org.apache.batik.test.util.ImageCompareText (Apache Batik)
+ * This class was created by extracting reusable code from
+ * org.apache.batik.test.util.ImageCompareText (Apache Batik)
* into this separate class.
* <p>
* TODO Move as utility class to XML Graphics Commons when possible
@@ -51,7 +51,7 @@ public class BitmapComparator {
* Builds a new BufferedImage that is the difference between the two input images
* @param ref the reference bitmap
* @param gen the newly generated bitmap
- * @return the diff bitmap
+ * @return the diff bitmap
*/
public static BufferedImage buildDiffImage(BufferedImage ref,
BufferedImage gen) {
@@ -104,7 +104,7 @@ public class BitmapComparator {
ColorModel cm = gen.getColorModel();
cm = GraphicsUtil.coerceData(genWR, cm, false);
}
-
+
if (!refPre) {
ColorModel cm = ref.getColorModel();
cm = GraphicsUtil.coerceData(refWR, cm, false);
@@ -114,14 +114,14 @@ public class BitmapComparator {
}
/**
- * Builds a combined image that places a number of images next to each other for
- * manual, visual comparison.
+ * Builds a combined image that places a number of images next to each other for
+ * manual, visual comparison.
* @param images the array of bitmaps
* @return the combined image
*/
public static BufferedImage buildCompareImage(BufferedImage[] images) {
BufferedImage cmp = new BufferedImage(
- images[0].getWidth() * images.length,
+ images[0].getWidth() * images.length,
images[0].getHeight(), BufferedImage.TYPE_INT_ARGB);
Graphics2D g = cmp.createGraphics();
@@ -145,8 +145,8 @@ public class BitmapComparator {
}
/**
- * Builds a combined image that places two images next to each other for
- * manual, visual comparison.
+ * Builds a combined image that places two images next to each other for
+ * manual, visual comparison.
* @param ref the reference image
* @param gen the actual image
* @return the combined image
@@ -155,7 +155,7 @@ public class BitmapComparator {
BufferedImage gen) {
return buildCompareImage(new BufferedImage[] {ref, gen});
}
-
+
/**
* Loads an image from a URL
* @param url the URL to the image
@@ -173,7 +173,7 @@ public class BitmapComparator {
if (red == null) {
return null;
}
-
+
BufferedImage img = new BufferedImage(red.getWidth(),
red.getHeight(),
BufferedImage.TYPE_INT_ARGB);
@@ -192,7 +192,7 @@ public class BitmapComparator {
InputStream in = new java.io.FileInputStream(bitmapFile);
try {
in = new java.io.BufferedInputStream(in);
-
+
ImageTagRegistry reg = ImageTagRegistry.getRegistry();
Filter filt = reg.readStream(in);
if (filt == null) {
@@ -203,7 +203,7 @@ public class BitmapComparator {
if (red == null) {
return null;
}
-
+
BufferedImage img = new BufferedImage(red.getWidth(),
red.getHeight(),
BufferedImage.TYPE_INT_ARGB);
diff --git a/test/java/org/apache/fop/visual/BitmapProducer.java b/test/java/org/apache/fop/visual/BitmapProducer.java
index 4a16bd276..6aba0296a 100644
--- a/test/java/org/apache/fop/visual/BitmapProducer.java
+++ b/test/java/org/apache/fop/visual/BitmapProducer.java
@@ -35,5 +35,5 @@ public interface BitmapProducer {
* @return the generated BufferedImage
*/
BufferedImage produce(File src, ProducerContext context);
-
+
}
diff --git a/test/java/org/apache/fop/visual/BitmapProducerJava2D.java b/test/java/org/apache/fop/visual/BitmapProducerJava2D.java
index c445fe078..13f26e022 100644
--- a/test/java/org/apache/fop/visual/BitmapProducerJava2D.java
+++ b/test/java/org/apache/fop/visual/BitmapProducerJava2D.java
@@ -55,7 +55,7 @@ public class BitmapProducerJava2D extends AbstractBitmapProducer implements Conf
// configure fopFactory as desired
private FopFactory fopFactory = FopFactory.newInstance();
-
+
private boolean deleteTempFiles;
/** @see org.apache.avalon.framework.configuration.Configurable */
@@ -69,20 +69,20 @@ public class BitmapProducerJava2D extends AbstractBitmapProducer implements Conf
FOUserAgent userAgent = fopFactory.newFOUserAgent();
userAgent.setTargetResolution(context.getTargetResolution());
userAgent.setBaseURL(src.getParentFile().toURL().toString());
-
+
File outputFile = new File(context.getTargetDir(), src.getName() + ".java2d.png");
OutputStream out = new FileOutputStream(outputFile);
out = new BufferedOutputStream(out);
try {
Fop fop = fopFactory.newFop(MimeConstants.MIME_PNG, userAgent, out);
SAXResult res = new SAXResult(fop.getDefaultHandler());
-
+
Transformer transformer = getTransformer(context);
transformer.transform(new StreamSource(src), res);
} finally {
IOUtils.closeQuietly(out);
}
-
+
BufferedImage img = BitmapComparator.getImage(outputFile);
if (deleteTempFiles) {
if (!outputFile.delete()) {
diff --git a/test/java/org/apache/fop/visual/BitmapProducerPDF.java b/test/java/org/apache/fop/visual/BitmapProducerPDF.java
index a7f2f1849..a6f667f80 100644
--- a/test/java/org/apache/fop/visual/BitmapProducerPDF.java
+++ b/test/java/org/apache/fop/visual/BitmapProducerPDF.java
@@ -22,7 +22,7 @@ package org.apache.fop.visual;
import org.apache.fop.apps.MimeConstants;
/**
- * BitmapProducer implementation that uses the PDFRenderer and an external converter
+ * BitmapProducer implementation that uses the PDFRenderer and an external converter
* to create bitmaps.
* <p>
* See the superclass' javadoc for info on the configuration format.
@@ -33,10 +33,10 @@ public class BitmapProducerPDF extends AbstractPSPDFBitmapProducer {
protected String getTargetExtension() {
return "pdf";
}
-
+
/** @see org.apache.fop.visual.AbstractPSPDFBitmapProducer#getTargetFormat() */
protected String getTargetFormat() {
return MimeConstants.MIME_PDF;
}
-
+
}
diff --git a/test/java/org/apache/fop/visual/BitmapProducerPS.java b/test/java/org/apache/fop/visual/BitmapProducerPS.java
index a60346254..704cfb950 100644
--- a/test/java/org/apache/fop/visual/BitmapProducerPS.java
+++ b/test/java/org/apache/fop/visual/BitmapProducerPS.java
@@ -22,7 +22,7 @@ package org.apache.fop.visual;
import org.apache.fop.apps.MimeConstants;
/**
- * BitmapProducer implementation that uses the PSRenderer and an external converter
+ * BitmapProducer implementation that uses the PSRenderer and an external converter
* to create bitmaps.
* <p>
* See the superclass' javadoc for info on the configuration format.
@@ -33,11 +33,11 @@ public class BitmapProducerPS extends AbstractPSPDFBitmapProducer {
protected String getTargetExtension() {
return "ps";
}
-
+
/** @see org.apache.fop.visual.AbstractPSPDFBitmapProducer#getTargetFormat() */
protected String getTargetFormat() {
return MimeConstants.MIME_POSTSCRIPT;
}
-
+
}
diff --git a/test/java/org/apache/fop/visual/ConvertUtils.java b/test/java/org/apache/fop/visual/ConvertUtils.java
index cdfa0efb1..e83322f90 100644
--- a/test/java/org/apache/fop/visual/ConvertUtils.java
+++ b/test/java/org/apache/fop/visual/ConvertUtils.java
@@ -32,14 +32,14 @@ public class ConvertUtils {
/**
* Calls an external converter application (GhostScript, for example).
* @param cmd the full command
- * @param envp array of strings, each element of which has environment variable settings
+ * @param envp array of strings, each element of which has environment variable settings
* in format name=value.
- * @param workDir the working directory of the subprocess, or null if the subprocess should
+ * @param workDir the working directory of the subprocess, or null if the subprocess should
* inherit the working directory of the current process.
* @param log the logger to log output by the external application to
* @throws IOException in case the external call fails
*/
- public static void convert(String cmd, String[] envp, File workDir, final Log log)
+ public static void convert(String cmd, String[] envp, File workDir, final Log log)
throws IOException {
log.debug(cmd);
@@ -53,7 +53,7 @@ public class ConvertUtils {
log.error("ERR> " + line);
}
};
- StreamRedirector errorRedirector
+ StreamRedirector errorRedirector
= new StreamRedirector(process.getErrorStream(), errorHandler);
//Redirect stdout output
@@ -62,11 +62,11 @@ public class ConvertUtils {
log.debug("OUT> " + line);
}
};
- StreamRedirector outputRedirector
+ StreamRedirector outputRedirector
= new StreamRedirector(process.getInputStream(), outputHandler);
new Thread(errorRedirector).start();
new Thread(outputRedirector).start();
-
+
process.waitFor();
} catch (java.lang.InterruptedException ie) {
throw new IOException("The call to the external converter failed: " + ie.getMessage());
@@ -76,11 +76,11 @@ public class ConvertUtils {
int exitValue = process.exitValue();
if (exitValue != 0) {
- throw new IOException("The call to the external converter failed. Result: "
+ throw new IOException("The call to the external converter failed. Result: "
+ exitValue);
}
}
-
-
+
+
}
diff --git a/test/java/org/apache/fop/visual/ProducerContext.java b/test/java/org/apache/fop/visual/ProducerContext.java
index 11e103a73..214820c82 100644
--- a/test/java/org/apache/fop/visual/ProducerContext.java
+++ b/test/java/org/apache/fop/visual/ProducerContext.java
@@ -33,7 +33,7 @@ public class ProducerContext {
private Templates templates;
private int targetResolution;
private File targetDir;
-
+
/**
* @return the TransformerFactory to be used.
*/
@@ -43,7 +43,7 @@ public class ProducerContext {
}
return tFactory;
}
-
+
/**
* @return the requested bitmap resolution in dpi for all bitmaps.
*/
@@ -73,14 +73,14 @@ public class ProducerContext {
public void setTemplates(Templates templates) {
this.templates = templates;
}
-
+
/**
* @return the target directory for all produced bitmaps
*/
public File getTargetDir() {
return targetDir;
}
-
+
/**
* Sets the target directory for all produced bitmaps.
* @param targetDir the target directory
diff --git a/test/java/org/apache/fop/visual/RedirectorLineHandler.java b/test/java/org/apache/fop/visual/RedirectorLineHandler.java
index d77870397..017dcbe5b 100644
--- a/test/java/org/apache/fop/visual/RedirectorLineHandler.java
+++ b/test/java/org/apache/fop/visual/RedirectorLineHandler.java
@@ -34,7 +34,7 @@ public interface RedirectorLineHandler {
* @param line a line of application output
*/
void handleLine(String line);
-
+
/**
* Called after the last handleLine() call.
*/
diff --git a/test/java/org/apache/fop/visual/ReferenceBitmapLoader.java b/test/java/org/apache/fop/visual/ReferenceBitmapLoader.java
index 1d03e0f95..07db62fc9 100644
--- a/test/java/org/apache/fop/visual/ReferenceBitmapLoader.java
+++ b/test/java/org/apache/fop/visual/ReferenceBitmapLoader.java
@@ -41,7 +41,7 @@ import org.apache.avalon.framework.configuration.ConfigurationException;
public class ReferenceBitmapLoader extends AbstractBitmapProducer implements Configurable {
private File bitmapDirectory;
-
+
/** @see org.apache.avalon.framework.configuration.Configurable */
public void configure(Configuration cfg) throws ConfigurationException {
this.bitmapDirectory = new File(cfg.getChild("directory").getValue(null));
diff --git a/test/java/org/apache/fop/visual/StreamRedirector.java b/test/java/org/apache/fop/visual/StreamRedirector.java
index c96cf6c42..918f5bf5c 100644
--- a/test/java/org/apache/fop/visual/StreamRedirector.java
+++ b/test/java/org/apache/fop/visual/StreamRedirector.java
@@ -42,14 +42,14 @@ public class StreamRedirector implements Runnable {
this.in = in;
this.handler = handler;
}
-
+
/**
* @return true if the run() method was terminated by an exception.
*/
public boolean hasFailed() {
return (this.exception != null);
}
-
+
/**
* @return the exception if the run() method was terminated by an exception, or null
*/