diff options
Diffstat (limited to 'test')
12 files changed, 30 insertions, 42 deletions
diff --git a/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java b/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java index 198b430bc..084560798 100644 --- a/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java +++ b/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,6 @@ import org.apache.commons.io.output.ByteArrayOutputStream; /** * Basic runtime test for FOP's transcoders. It is used to verify that * nothing obvious is broken after compiling. - * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a> */ public abstract class AbstractBasicTranscoderTestCase extends AbstractFOPTestCase { diff --git a/test/java/org/apache/fop/AbstractFOPTestCase.java b/test/java/org/apache/fop/AbstractFOPTestCase.java index ba6bc4377..1fa960bb4 100644 --- a/test/java/org/apache/fop/AbstractFOPTestCase.java +++ b/test/java/org/apache/fop/AbstractFOPTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ import junit.framework.TestCase; /** * Abstract base test class for FOP's tests. - * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a> */ public abstract class AbstractFOPTestCase extends TestCase { diff --git a/test/java/org/apache/fop/BasicDriverTestCase.java b/test/java/org/apache/fop/BasicDriverTestCase.java index 655d8f10e..803ed8114 100644 --- a/test/java/org/apache/fop/BasicDriverTestCase.java +++ b/test/java/org/apache/fop/BasicDriverTestCase.java @@ -23,17 +23,13 @@ import java.io.File; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.dom.DOMResult; import javax.xml.transform.sax.SAXResult; import javax.xml.transform.stream.StreamSource; import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.fop.apps.Fop; import org.apache.fop.apps.InputHandler; -import org.w3c.dom.Document; /** * Basic runtime test for the old Fop class. It is used to verify that diff --git a/test/java/org/apache/fop/BasicDriverTestSuite.java b/test/java/org/apache/fop/BasicDriverTestSuite.java index bab0b9b44..5da150649 100644 --- a/test/java/org/apache/fop/BasicDriverTestSuite.java +++ b/test/java/org/apache/fop/BasicDriverTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,6 @@ import junit.framework.TestSuite; /** * Test suite for basic functionality of FOP's Driver API. - * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a> */ public class BasicDriverTestSuite { diff --git a/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java b/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java index b14047a68..492e8982d 100644 --- a/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java +++ b/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ import org.apache.fop.svg.PDFTranscoder; /** * Basic runtime test for the PDF transcoder. It is used to verify that * nothing obvious is broken after compiling. - * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a> */ public class BasicPDFTranscoderTestCase extends AbstractBasicTranscoderTestCase { diff --git a/test/java/org/apache/fop/BasicPSTranscoderTestCase.java b/test/java/org/apache/fop/BasicPSTranscoderTestCase.java index c33e3a5d3..e21283a7e 100644 --- a/test/java/org/apache/fop/BasicPSTranscoderTestCase.java +++ b/test/java/org/apache/fop/BasicPSTranscoderTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,6 @@ import org.apache.fop.render.ps.PSTranscoder; /** * Basic runtime test for the PS transcoder. It is used to verify that * nothing obvious is broken after compiling. - * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a> */ public class BasicPSTranscoderTestCase extends AbstractBasicTranscoderTestCase { diff --git a/test/java/org/apache/fop/BasicTranscoderTestSuite.java b/test/java/org/apache/fop/BasicTranscoderTestSuite.java index a9001d1ca..ec07b3a58 100644 --- a/test/java/org/apache/fop/BasicTranscoderTestSuite.java +++ b/test/java/org/apache/fop/BasicTranscoderTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,7 +23,6 @@ import junit.framework.TestSuite; /** * Test suite for basic functionality of FOP's transcoders. - * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a> */ public class BasicTranscoderTestSuite { diff --git a/test/java/org/apache/fop/DebugHelper.java b/test/java/org/apache/fop/DebugHelper.java index 79d0dd87e..bf95147c3 100644 --- a/test/java/org/apache/fop/DebugHelper.java +++ b/test/java/org/apache/fop/DebugHelper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005 Jeremias Maerki + * Copyright 2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,6 +28,9 @@ public class DebugHelper { private static boolean elObserversRegistered = false; + /** + * Registers the default element list observers used for debugging. + */ public static void registerStandardElementListObservers() { if (!elObserversRegistered) { ElementListObserver.addObserver(new LoggingElementListObserver()); diff --git a/test/java/org/apache/fop/DigestFilterTestCase.java b/test/java/org/apache/fop/DigestFilterTestCase.java index 5b028e0d0..2343b6560 100644 --- a/test/java/org/apache/fop/DigestFilterTestCase.java +++ b/test/java/org/apache/fop/DigestFilterTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ /* $Id$ */ - package org.apache.fop; import java.io.IOException; @@ -41,15 +40,13 @@ public class DigestFilterTestCase extends TestCase { private SAXParserFactory parserFactory; - /* (non-Javadoc) - * @see junit.framework.TestCase#setUp() - */ + /** @see junit.framework.TestCase#setUp() */ protected void setUp() { parserFactory = SAXParserFactory.newInstance(); parserFactory.setNamespaceAware(true); } - private boolean compareDigest(byte a[], byte b[]) { + private boolean compareDigest(byte[] a, byte[] b) { if (a.length != b.length) { return false; } @@ -61,7 +58,7 @@ public class DigestFilterTestCase extends TestCase { return true; } - private String digestToString(byte digest[]) { + private String digestToString(byte[] digest) { StringBuffer buffer = new StringBuffer(2 * digest.length); for (int i = 0; i < digest.length; i++) { int val = digest[i]; @@ -90,7 +87,7 @@ public class DigestFilterTestCase extends TestCase { XMLReader parser = parserFactory.newSAXParser().getXMLReader(); DigestFilter digestFilter = new DigestFilter("MD5"); digestFilter.setParent(parser); - digestFilter.setFeature("http://xml.org/sax/features/namespaces",true); + digestFilter.setFeature("http://xml.org/sax/features/namespaces", true); parser.setContentHandler(digestFilter); InputSource inputSource = new InputSource(new StringReader(input)); parser.parse(inputSource); @@ -103,8 +100,8 @@ public class DigestFilterTestCase extends TestCase { ParserConfigurationException, SAXException, IOException { - byte lfDigest[] = runTest("<a>\n</a>"); - byte crlfDigest[] = runTest("<a>\r\n</a>"); + byte[] lfDigest = runTest("<a>\n</a>"); + byte[] crlfDigest = runTest("<a>\r\n</a>"); assertTrue( "LF: " + digestToString(lfDigest) @@ -119,15 +116,15 @@ public class DigestFilterTestCase extends TestCase { ParserConfigurationException, SAXException, IOException { - byte sortDigest[] = runTest("<a a1='1' a2='2' a3='3'/>"); - byte permutationDigest[] = runTest("<a a2='2' a3='3' a1='1'/>"); + byte[] sortDigest = runTest("<a a1='1' a2='2' a3='3'/>"); + byte[] permutationDigest = runTest("<a a2='2' a3='3' a1='1'/>"); assertTrue( "Sort: " + digestToString(sortDigest) + " permuted: " + digestToString(permutationDigest), compareDigest(sortDigest, permutationDigest)); - byte reverseDigest[] = runTest("<a a3='3' a2='2' a1='1'/>"); + byte[] reverseDigest = runTest("<a a3='3' a2='2' a1='1'/>"); assertTrue( "Sort: " + digestToString(sortDigest) @@ -142,8 +139,8 @@ public class DigestFilterTestCase extends TestCase { ParserConfigurationException, SAXException, IOException { - byte prefix1Digest[] = runTest("<a:a xmlns:a='foo'/>"); - byte prefix2Digest[] = runTest("<b:a xmlns:b='foo'/>"); + byte[] prefix1Digest = runTest("<a:a xmlns:a='foo'/>"); + byte[] prefix2Digest = runTest("<b:a xmlns:b='foo'/>"); assertTrue( "prefix1: " + digestToString(prefix1Digest) diff --git a/test/java/org/apache/fop/GenericFOPTestCase.java b/test/java/org/apache/fop/GenericFOPTestCase.java index 69e9e15b0..538649664 100644 --- a/test/java/org/apache/fop/GenericFOPTestCase.java +++ b/test/java/org/apache/fop/GenericFOPTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,7 +32,6 @@ import junit.framework.TestSuite; import org.apache.fop.apps.Fop; import org.apache.fop.apps.FOUserAgent; -import org.apache.fop.render.pdf.PDFRenderer; import org.apache.fop.util.DigestFilter; import org.xml.sax.InputSource; @@ -62,15 +61,13 @@ public final class GenericFOPTestCase extends TestCase { super(name); } - /* (non-Javadoc) - * @see junit.framework.TestCase#setUp() - */ + /** @see junit.framework.TestCase#setUp() */ protected void setUp() throws Exception { parserFactory = SAXParserFactory.newInstance(); parserFactory.setNamespaceAware(true); } - public final void testSimple() throws Exception { + public void testSimple() throws Exception { final String digestIn = "17bf13298796065f7775db8707133aeb"; final String digestOut = "e2761f51152f6663911e567901596707"; final String fo = @@ -90,7 +87,7 @@ public final class GenericFOPTestCase extends TestCase { renderPDF(fo, digestIn, digestOut); } - private String digestToString(byte value[]) { + private String digestToString(byte[] value) { StringBuffer buffer = new StringBuffer(2 * value.length); for (int i = 0; i < value.length; i++) { int val = value[i]; @@ -115,7 +112,6 @@ public final class GenericFOPTestCase extends TestCase { FOUserAgent foUserAgent = new FOUserAgent(); foUserAgent.setCreationDate(new Date(10000)); MessageDigest outDigest = MessageDigest.getInstance("MD5"); - ByteArrayOutputStream outBytes = new ByteArrayOutputStream(); DigestOutputStream out = new DigestOutputStream(new ByteArrayOutputStream(), outDigest); Fop fop = new Fop(Fop.RENDER_PDF, foUserAgent); diff --git a/test/java/org/apache/fop/UtilityCodeTestSuite.java b/test/java/org/apache/fop/UtilityCodeTestSuite.java index 529aa621e..7253e7669 100644 --- a/test/java/org/apache/fop/UtilityCodeTestSuite.java +++ b/test/java/org/apache/fop/UtilityCodeTestSuite.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2004 The Apache Software Foundation. + * Copyright 1999-2005 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +26,6 @@ import junit.framework.TestSuite; /** * Test suite for FOP's utility classes. - * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a> */ public class UtilityCodeTestSuite { diff --git a/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java b/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java index f912e2001..d77186b2f 100644 --- a/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java +++ b/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java @@ -13,6 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + +/* $Id$ */ + package org.apache.fop.layoutengine; /** |