You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/08/10 23:05:49 UTC

svn commit: r231325 - in /xmlgraphics/fop/trunk/test/java/org/apache/fop: ./ layoutengine/

Author: jeremias
Date: Wed Aug 10 14:05:39 2005
New Revision: 231325

URL: http://svn.apache.org/viewcvs?rev=231325&view=rev
Log:
Some general housekeeping. No functional changes.

Modified:
    xmlgraphics/fop/trunk/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/AbstractFOPTestCase.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicDriverTestCase.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicDriverTestSuite.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicPSTranscoderTestCase.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicTranscoderTestSuite.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/DebugHelper.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/DigestFilterTestCase.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/GenericFOPTestCase.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/UtilityCodeTestSuite.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/AbstractBasicTranscoderTestCase.java Wed Aug 10 14:05:39 2005
@@ -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 @@
 /**
  * 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 {
 

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/AbstractFOPTestCase.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/AbstractFOPTestCase.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/AbstractFOPTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/AbstractFOPTestCase.java Wed Aug 10 14:05:39 2005
@@ -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 @@
 
 /**
  * Abstract base test class for FOP's tests.
- * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
  */
 public abstract class AbstractFOPTestCase extends TestCase {
 

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicDriverTestCase.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicDriverTestCase.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicDriverTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicDriverTestCase.java Wed Aug 10 14:05:39 2005
@@ -23,17 +23,13 @@
 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 

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicDriverTestSuite.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicDriverTestSuite.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicDriverTestSuite.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicDriverTestSuite.java Wed Aug 10 14:05:39 2005
@@ -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 @@
 
 /**
  * Test suite for basic functionality of FOP's Driver API.
- * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
  */
 public class BasicDriverTestSuite {
 

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicPDFTranscoderTestCase.java Wed Aug 10 14:05:39 2005
@@ -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 @@
 /**
  * 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 {
 

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicPSTranscoderTestCase.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicPSTranscoderTestCase.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicPSTranscoderTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicPSTranscoderTestCase.java Wed Aug 10 14:05:39 2005
@@ -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 @@
 /**
  * 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 {
 

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicTranscoderTestSuite.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicTranscoderTestSuite.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicTranscoderTestSuite.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/BasicTranscoderTestSuite.java Wed Aug 10 14:05:39 2005
@@ -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 @@
 
 /**
  * Test suite for basic functionality of FOP's transcoders.
- * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
  */
 public class BasicTranscoderTestSuite {
 

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/DebugHelper.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/DebugHelper.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/DebugHelper.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/DebugHelper.java Wed Aug 10 14:05:39 2005
@@ -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 @@
 
     private static boolean elObserversRegistered = false;
     
+    /**
+     * Registers the default element list observers used for debugging. 
+     */
     public static void registerStandardElementListObservers() {
         if (!elObserversRegistered) {
             ElementListObserver.addObserver(new LoggingElementListObserver());

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/DigestFilterTestCase.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/DigestFilterTestCase.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/DigestFilterTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/DigestFilterTestCase.java Wed Aug 10 14:05:39 2005
@@ -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 @@
 
     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 @@
         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 @@
         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 @@
             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 @@
             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 @@
             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)

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/GenericFOPTestCase.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/GenericFOPTestCase.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/GenericFOPTestCase.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/GenericFOPTestCase.java Wed Aug 10 14:05:39 2005
@@ -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 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 @@
         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 @@
         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 @@
         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);

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/UtilityCodeTestSuite.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/UtilityCodeTestSuite.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/UtilityCodeTestSuite.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/UtilityCodeTestSuite.java Wed Aug 10 14:05:39 2005
@@ -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 @@
 
 /**
  * Test suite for FOP's utility classes.
- * @author <a href="mailto:jeremias@apache.org">Jeremias Maerki</a>
  */
 public class UtilityCodeTestSuite {
 

Modified: xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java?rev=231325&r1=231324&r2=231325&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java (original)
+++ xmlgraphics/fop/trunk/test/java/org/apache/fop/layoutengine/LayoutEngineCheck.java Wed Aug 10 14:05:39 2005
@@ -13,6 +13,9 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+/* $Id$ */
+
 package org.apache.fop.layoutengine;
 
 /**



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org