vhardy      01/09/28 05:02:48

  Modified:    test-sources/org/apache/batik/test AbstractTest.java
               test-resources/org/apache/batik/test regard.xml
                        unitTesting.xml
  Added:       test-sources/org/apache/batik/ext/awt/image/codec
                        Base64PNGEncoderTest.java Messages.java
                        PNGEncoderTest.java
               test-sources/org/apache/batik/svggen DrawImage.java
               test-resources/org/apache/batik/ext/awt/image/codec
                        unitTesting.xml
               test-resources/org/apache/batik/ext/awt/image/codec/resources
                        Messages.properties
               test-resources/org/apache/batik/util unitTesting.xml
  Log:
  Added new tests:
    - org.apache.batik.svggen.DrawImage, which uncovers a bug in
      PNG encoding.
    - org.apache.batik.ext.awt.image.codec.PNGEncoder and Base64PNGEncoder
      which validate the operation of the PNGEncoder. These two tests
      currently fail when using a sub-image of a BufferedImage.
  
  Revision  Changes    Path
  1.1                  
xml-batik/test-sources/org/apache/batik/ext/awt/image/codec/Base64PNGEncoderTest.java
  
  Index: Base64PNGEncoderTest.java
  ===================================================================
  /*****************************************************************************
   * Copyright (C) The Apache Software Foundation. All rights reserved.        *
   * ------------------------------------------------------------------------- *
   * This software is published under the terms of the Apache Software License *
   * version 1.1, a copy of which has been included with this distribution in  *
   * the LICENSE file.                                                         *
   *****************************************************************************/
  
  package org.apache.batik.ext.awt.image.codec;
  
  import org.apache.batik.test.*;
  import org.apache.batik.util.*;
  import java.awt.*;
  import java.awt.geom.*;
  import java.awt.image.*;
  import java.io.*;
  
  /**
   * This test validates the PNGEncoder operation when combined with
   * Base64 encoding.
   *
   * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Hardy</a>
   * @version $Id: Base64PNGEncoderTest.java,v 1.1 2001/09/28 12:02:47 vhardy Exp $
   */
  public class Base64PNGEncoderTest extends PNGEncoderTest {
      /**
       * Template method for building the PNG output stream
       */
      public OutputStream buildOutputStream(ByteArrayOutputStream bos){
          return new Base64EncoderStream(bos);
      }
  
      /**
       * Template method for building the PNG input stream
       */
      public InputStream buildInputStream(ByteArrayOutputStream bos){
          ByteArrayInputStream bis 
              = new ByteArrayInputStream(bos.toByteArray());
  
          return new Base64DecodeStream(bis);
      }
  }
  
  
  
  1.1                  
xml-batik/test-sources/org/apache/batik/ext/awt/image/codec/Messages.java
  
  Index: Messages.java
  ===================================================================
  /*****************************************************************************
   * Copyright (C) The Apache Software Foundation. All rights reserved.        *
   * ------------------------------------------------------------------------- *
   * This software is published under the terms of the Apache Software License *
   * version 1.1, a copy of which has been included with this distribution in  *
   * the LICENSE file.                                                         *
   *****************************************************************************/
  
  package org.apache.batik.ext.awt.image.codec;
  
  import java.util.Locale;
  import java.util.MissingResourceException;
  import org.apache.batik.i18n.Localizable;
  import org.apache.batik.i18n.LocalizableSupport;
  
  /**
   * This class manages the message for the test.svg module.
   *
   * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Hardy</a>
   * @version $Id: Messages.java,v 1.1 2001/09/28 12:02:47 vhardy Exp $
   */
  public class Messages {
  
      /**
       * This class does not need to be instantiated.
       */
      protected Messages() { }
  
      /**
       * The error messages bundle class name.
       */
      protected final static String RESOURCES =
          "org.apache.batik.ext.awt.image.codec.resources.Messages";
  
      /**
       * The localizable support for the error messages.
       */
      protected static LocalizableSupport localizableSupport =
          new LocalizableSupport(RESOURCES);
  
      /**
       * Implements {@link org.apache.batik.i18n.Localizable#setLocale(Locale)}.
       */
      public static void setLocale(Locale l) {
          localizableSupport.setLocale(l);
      }
  
      /**
       * Implements {@link org.apache.batik.i18n.Localizable#getLocale()}.
       */
      public static Locale getLocale() {
          return localizableSupport.getLocale();
      }
  
      /**
       * Implements {@link
       * org.apache.batik.i18n.Localizable#formatMessage(String,Object[])}.
       */
      public static String formatMessage(String key, Object[] args)
          throws MissingResourceException {
          return localizableSupport.formatMessage(key, args);
      }
  }
  
  
  
  1.1                  
xml-batik/test-sources/org/apache/batik/ext/awt/image/codec/PNGEncoderTest.java
  
  Index: PNGEncoderTest.java
  ===================================================================
  /*****************************************************************************
   * Copyright (C) The Apache Software Foundation. All rights reserved.        *
   * ------------------------------------------------------------------------- *
   * This software is published under the terms of the Apache Software License *
   * version 1.1, a copy of which has been included with this distribution in  *
   * the LICENSE file.                                                         *
   *****************************************************************************/
  
  package org.apache.batik.ext.awt.image.codec;
  
  import org.apache.batik.test.*;
  import java.awt.*;
  import java.awt.geom.*;
  import java.awt.image.*;
  import java.io.*;
  
  /**
   * This test validates the PNGEncoder operation. It creates a
   * BufferedImage, then encodes it with the PNGEncoder, then
   * decodes it and compares the decoded image with the original one.
   *
   * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Hardy</a>
   * @version $Id: PNGEncoderTest.java,v 1.1 2001/09/28 12:02:47 vhardy Exp $
   */
  public class PNGEncoderTest extends AbstractTest {
      /**
       * Error when image cannot be encoded
       * {0} = trace for the exception which was reported
       */
      public static final String ERROR_CANNOT_ENCODE_IMAGE 
          = "PNGEncoderTest.error.cannot.encode.image";
  
      /**
       * Error when image cannot be decoded
       * {0} = trace for the exception which was reported
       */
      public static final String ERROR_CANNOT_DECODE_IMAGE
          = "PNGEncoderTest.error.cannot.decode.image";
  
      /**
       * Decoded image differs from encoded image
       */
      public static final String ERROR_DECODED_DOES_NOT_MATCH_ENCODED
          = "PNGEncoderTest.error.decoded.does.not.match.encoded";
  
      /**
       * Entry describing the error
       */
      public static final String ENTRY_KEY_ERROR_DESCRIPTION 
          = "SVGRenderingAccuracyTest.entry.key.error.description";
  
      public TestReport runImpl() throws Exception {
          // Create a BufferedImage to be encoded
          BufferedImage image = new BufferedImage(100, 75, 
BufferedImage.TYPE_INT_ARGB);
          Graphics2D ig = image.createGraphics();
          ig.scale(.5, .5);
          ig.setPaint(new Color(128,0,0));
          ig.fillRect(0, 0, 100, 50);
          ig.setPaint(Color.orange);
          ig.fillRect(100, 0, 100, 50);
          ig.setPaint(Color.yellow);
          ig.fillRect(0, 50, 100, 50);
          ig.setPaint(Color.red);
          ig.fillRect(100, 50, 100, 50);
          ig.setPaint(new Color(255, 127, 127));
          ig.fillRect(0, 100, 100, 50);
          ig.setPaint(Color.black);
          ig.draw(new Rectangle2D.Double(0.5, 0.5, 199, 149));
          ig.dispose();
  
          image = image.getSubimage(50, 0, 50, 25); 
  
          // Create an output stream where the PNG data
          // will be stored.
          ByteArrayOutputStream bos = new ByteArrayOutputStream();
          OutputStream os = buildOutputStream(bos);
  
          // Now, try to encode image
          PNGEncodeParam params =
              PNGEncodeParam.getDefaultEncodeParam(image);
          PNGImageEncoder pngImageEncoder = new PNGImageEncoder(os, params);
  
          try{
              pngImageEncoder.encode(image);
              os.close();
          }catch(Exception e){
              return reportException(ERROR_CANNOT_ENCODE_IMAGE, e);
          }
  
          // Now, try to decode image
          InputStream is 
              = buildInputStream(bos);
  
          PNGImageDecoder pngImageDecoder 
              = new PNGImageDecoder(is, new PNGDecodeParam());
  
          RenderedImage decodedRenderedImage = null;
          try{
              decodedRenderedImage = pngImageDecoder.decodeAsRenderedImage(0);
          }catch(Exception e){
              return reportException(ERROR_CANNOT_DECODE_IMAGE,
                              e);
          }
  
          BufferedImage decodedImage = null;
          if(decodedRenderedImage instanceof BufferedImage){
              decodedImage = (BufferedImage)decodedRenderedImage;
          }
          else{
              decodedImage = new BufferedImage(decodedRenderedImage.getWidth(),
                                               decodedRenderedImage.getHeight(),
                                               BufferedImage.TYPE_INT_ARGB);
              ig = decodedImage.createGraphics();
              ig.drawRenderedImage(decodedRenderedImage, 
                                   new AffineTransform());
              ig.dispose();
          }
  
          // Compare images
          if(checkIdentical(image, decodedImage) != true){
              return reportError(ERROR_DECODED_DOES_NOT_MATCH_ENCODED);
          }
  
          return reportSuccess();
      }
  
      /**
       * Template method for building the PNG output stream. This gives a
       * chance to sub-classes (e.g., Base64PNGEncoderTest) to add an
       * additional encoding.
       */
      public OutputStream buildOutputStream(ByteArrayOutputStream bos){
          return bos;
      }
  
      /**
       * Template method for building the PNG input stream. This gives a
       * chance to sub-classes (e.g., Base64PNGEncoderTest) to add an
       * additional decoding.
       */
      public InputStream buildInputStream(ByteArrayOutputStream bos){
          return new ByteArrayInputStream(bos.toByteArray());
      }
  
      /**
       * Compares the data for the two images
       */
      public static boolean checkIdentical(BufferedImage imgA,
                                           BufferedImage imgB){
          boolean identical = true;
          if(imgA.getWidth() == imgB.getWidth() 
             &&
             imgA.getHeight() == imgB.getHeight()){
              int w = imgA.getWidth();
              int h = imgA.getHeight();
              for(int i=0; i<h; i++){
                  for(int j=0; j<w; j++){
                      if(imgA.getRGB(j,i) != imgB.getRGB(j,i)){
                          identical = false;
                          break;
                      }
                  }
                  if( !identical ){
                      break;
                  }
              }
          }
  
          return identical;
      }
  
      /**
       * Convenience method to report a simple error code.
       */
      public TestReport reportError(String errorCode){
          DefaultTestReport report = new DefaultTestReport(this);
          report.setErrorCode(errorCode);
          report.setPassed(false);
          return report;
      }
  
      /**
       * Convenience method to report success.
       */
      public TestReport reportSuccess(){
          DefaultTestReport report = new DefaultTestReport(this);
          report.setPassed(true);
          return report;
      }
          
      /**
       * Convenience method to help implementations report errors.
       * An <tt>AbstractTest</tt> extension will typically catch 
       * exceptions for specific error conditions it wants to point 
       * out. For example:<tt>
       * public TestReport runImpl() throws Exception { <br />
       *   try{ <br />
       *      .... something .... <br />
       *   catch(MySpecialException e){ <br />
       *      return reportException(MY_SPECIAL_ERROR_CODE, e); <br />
       *   } <br />
       * <br />
       * public static final String MY_SPECIAL_ERROR_CODE = 
"myNonQualifiedClassName.my.error.code" <br />
       * <br />
       * </tt> <br />
       * Note that the implementor will also need to add an entry
       * in its Messages.properties file. That file is expected to be 
       * in a resource file called <tt>Messages</tt> having the same package 
       * name as the <tt>Test</tt> class, appended with "<tt>.resources</tt>".
       */
      public TestReport reportException(String errorCode,
                                        Exception e){
          DefaultTestReport report 
              = new DefaultTestReport(this);
  
          StringWriter trace = new StringWriter();
          e.printStackTrace(new PrintWriter(trace));
          report.setErrorCode(errorCode);
          report.setDescription(new TestReport.Entry[] {
              new TestReport.Entry
                  (Messages.formatMessage(ENTRY_KEY_ERROR_DESCRIPTION, null),
                   Messages.formatMessage
                       (errorCode,
                        new String[]{trace.toString()})) });
          report.setPassed(false);
          return report;
      }
              
  }
  
  
  
  1.1                  xml-batik/test-sources/org/apache/batik/svggen/DrawImage.java
  
  Index: DrawImage.java
  ===================================================================
  /*****************************************************************************
   * Copyright (C) The Apache Software Foundation. All rights reserved.        *
   * ------------------------------------------------------------------------- *
   * This software is published under the terms of the Apache Software License *
   * version 1.1, a copy of which has been included with this distribution in  *
   * the LICENSE file.                                                         *
   *****************************************************************************/
  
  package org.apache.batik.svggen;
  
  import java.awt.*;
  import java.awt.geom.*;
  import java.awt.image.*;
  
  /**
   * This test validates drawImage conversions.
   *
   * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Hardy</a>
   * @version $Id: DrawImage.java,v 1.1 2001/09/28 12:02:47 vhardy Exp $
   */
  public class DrawImage implements Painter {
      public void paint(Graphics2D g) {
          g.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                             RenderingHints.VALUE_ANTIALIAS_ON);
  
          // Create an Image
          BufferedImage image = new BufferedImage(100, 75, 
BufferedImage.TYPE_INT_ARGB);
          Graphics2D ig = image.createGraphics();
          ig.scale(.5, .5);
          ig.setPaint(new Color(128,0,0));
          ig.fillRect(0, 0, 100, 50);
          ig.setPaint(Color.orange);
          ig.fillRect(100, 0, 100, 50);
          ig.setPaint(Color.yellow);
          ig.fillRect(0, 50, 100, 50);
          ig.setPaint(Color.red);
          ig.fillRect(100, 50, 100, 50);
          ig.setPaint(new Color(255, 127, 127));
          ig.fillRect(0, 100, 100, 50);
          ig.setPaint(Color.black);
          ig.draw(new Rectangle2D.Double(0.5, 0.5, 199, 149));
          ig.dispose();
  
          // drawImage(img,x,y,bgcolor,observer);
          g.drawImage(image, 5, 10, Color.gray, null);
          g.translate(150, 0);
          
          // drawImage(img,x,y,w,h,bgcolor,observer)
          g.drawImage(image, 5, 10, 50, 40, null);
          g.translate(-150, 80);
          
          // drawImage(img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,observer);
          g.drawImage(image, 5, 10, 45, 40, 50, 0, 100, 25, null);
          g.translate(150, 0);
          
          // drawImage(img,dx1,dy1,dx2,dy2,sx1,sy1,sx2,sy2,bgcolor,observer);
          g.drawImage(image, 5, 10, 45, 40,   50, 50, 100, 75, Color.gray, null);
          g.translate(-150, 80);
          
          // drawImage(img,xform,obs)
          AffineTransform at = new AffineTransform();
          at.scale(.5, .3);
          at.translate(5, 10);
          g.drawImage(image, at, null);
          
          g.translate(150, 0);
  
          // drawImage(img,op,x,y);
          RescaleOp op = new RescaleOp(.5f, 0f, null);
            g.drawImage(image,op,5,10);
          
  
      }
  }
  
  
  
  1.3       +2 -1      xml-batik/test-sources/org/apache/batik/test/AbstractTest.java
  
  Index: AbstractTest.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/test-sources/org/apache/batik/test/AbstractTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractTest.java 2001/04/16 22:42:37     1.2
  +++ AbstractTest.java 2001/09/28 12:02:47     1.3
  @@ -16,7 +16,7 @@
    * method.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Vincent Hardy</a>
  - * @version $Id: AbstractTest.java,v 1.2 2001/04/16 22:42:37 vhardy Exp $
  + * @version $Id: AbstractTest.java,v 1.3 2001/09/28 12:02:47 vhardy Exp $
    */
   public abstract class AbstractTest implements Test {
       /**
  @@ -89,4 +89,5 @@
        * exceptions due to their own processing propagate. 
        */
       public abstract TestReport runImpl() throws Exception;
  +
   }
  
  
  
  1.1                  
xml-batik/test-resources/org/apache/batik/ext/awt/image/codec/unitTesting.xml
  
  Index: unitTesting.xml
  ===================================================================
  <!-- ========================================================================= -->
  <!-- Copyright (C) The Apache Software Foundation. All rights reserved.        -->
  <!--                                                                           -->
  <!-- This software is published under the terms of the Apache Software License -->
  <!-- version 1.1, a copy of which has been included with this distribution in  -->
  <!-- the LICENSE file.                                                         -->
  <!-- ========================================================================= -->
  
  <!-- ========================================================================= -->
  <!-- @author [EMAIL PROTECTED]                                         -->
  <!-- @version $Id: unitTesting.xml,v 1.1 2001/09/28 12:02:47 vhardy Exp $ -->
  <!-- ========================================================================= -->
  <testSuite name="org.apache.batik.ext.awt.image.codec package - Unit Testing">
      <!-- ========================================================================== 
-->
      <!-- Validates that PNGEncoding is operating as expected                        
-->
      <!-- ========================================================================== 
-->
      <test class="org.apache.batik.ext.awt.image.codec.PNGEncoderTest" />
      <test class="org.apache.batik.ext.awt.image.codec.Base64PNGEncoderTest" />
  </testSuite>
  
  
  1.1                  
xml-batik/test-resources/org/apache/batik/ext/awt/image/codec/resources/Messages.properties
  
  Index: Messages.properties
  ===================================================================
  #############################################################################
  # Copyright (C) The Apache Software Foundation. All rights reserved.        #
  #############################################################################
  # This software is published under the terms of the Apache Software License #
  # version 1.1, a copy of which has been included with this distribution in  #
  # the LICENSE file.                                                         #
  #############################################################################
  
  #
  # Error Message values for org.apache.batik.ext.awt.image.codec Tests
  #
  PNGEncoderTest.error.cannot.encode.image = \
  Error while encoding BufferedImage : \
  Got exception : {0}
  
  PNGEncoderTest.error.cannot.decode.image = \
  Error while decoding PNG image. \
  Got exception : {0}
  
  
  
  
  1.9       +25 -4     xml-batik/test-resources/org/apache/batik/test/regard.xml
  
  Index: regard.xml
  ===================================================================
  RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/test/regard.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- regard.xml        2001/09/18 10:58:51     1.8
  +++ regard.xml        2001/09/28 12:02:47     1.9
  @@ -11,7 +11,7 @@
   <!-- regression testing.                                                       -->
   <!--                                                                           -->
   <!-- @author [EMAIL PROTECTED]                                         -->
  -<!-- @version $Id: regard.xml,v 1.8 2001/09/18 10:58:51 vhardy Exp $  -->
  +<!-- @version $Id: regard.xml,v 1.9 2001/09/28 12:02:47 vhardy Exp $  -->
   <!-- ========================================================================= -->
   <testRun name="Batik Standard Regression Test Run">
       <testRun name="REGARD">
  @@ -28,12 +28,33 @@
               </arg>
           </testReportProcessor>
   
  -        <testSuite 
href="file:test-resources/org/apache/batik/util/regParsedURL.xml" /> 
  -        <testSuite href="file:test-resources/org/apache/batik/util/regBase64.xml" />
  +        <!-- ====================================================================== 
-->
  +        <!--                     Rendering Accuracy Tests                           
-->
  +        <!-- ====================================================================== 
-->
  +
  +        <!--                           SVG Working Group                            
-->
  +        <!--                           Basic Effectivity                            
-->
  +        <!--                               Test Suite                               
-->
           <testSuite 
href="file:test-resources/org/apache/batik/test/samplesRendering.xml" />  
  +
  +
  +        <!--                                Batik                                   
 -->
  +        <!--                               Samples                                  
 -->
  +        <testSuite href="file:test-resources/org/apache/batik/test/beSuite.xml" />  
  +
  +
  +        <!-- ====================================================================== 
-->
  +        <!--                         SVG Generator Tests                            
-->
  +        <!-- ====================================================================== 
-->
           <testSuite href="file:test-resources/org/apache/batik/svggen/regsvggen.xml" 
/> 
  +
  +
  +        <!-- ====================================================================== 
-->
  +        <!--                              Unit Testing                              
-->
  +        <!-- ====================================================================== 
-->
           <testSuite href="file:test-resources/org/apache/batik/test/unitTesting.xml" 
/>
  -        <testSuite href="file:test-resources/org/apache/batik/test/beSuite.xml" />  
  +        <testSuite 
href="file:test-resources/org/apache/batik/ext/awt/image/codec/unitTesting.xml" />
  +        <testSuite href="file:test-resources/org/apache/batik/util/unitTesting.xml" 
/>
   
       </testRun>
   
  
  
  
  1.3       +2 -1      xml-batik/test-resources/org/apache/batik/test/unitTesting.xml
  
  Index: unitTesting.xml
  ===================================================================
  RCS file: /home/cvs/xml-batik/test-resources/org/apache/batik/test/unitTesting.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- unitTesting.xml   2001/04/20 06:36:17     1.2
  +++ unitTesting.xml   2001/09/28 12:02:47     1.3
  @@ -8,7 +8,7 @@
   
   <!-- ========================================================================= -->
   <!-- @author [EMAIL PROTECTED]                                         -->
  -<!-- @version $Id: unitTesting.xml,v 1.2 2001/04/20 06:36:17 vhardy Exp $ -->
  +<!-- @version $Id: unitTesting.xml,v 1.3 2001/09/28 12:02:47 vhardy Exp $ -->
   <!-- ========================================================================= -->
   <testSuite name="Test Module - Unit Testing">
       <!-- ========================================================================== 
-->
  @@ -20,4 +20,5 @@
       <!-- Validates that the SVGAccuracyTest class is operating as expected          
-->
       <!-- ========================================================================== 
-->
       <test class="org.apache.batik.svggen.SVGAccuracyTestValidator" />
  +
   </testSuite>
  
  
  
  1.1                  xml-batik/test-resources/org/apache/batik/util/unitTesting.xml
  
  Index: unitTesting.xml
  ===================================================================
  <!-- ====================================================================== -->
  <!-- Copyright (C) The Apache Software Foundation. All rights reserved.     -->
  <!--                                                                        -->
  <!-- This software is published under the terms of the Apache Software      -->
  <!-- License version 1.1, a copy of which has been included with this       -->
  <!-- distribution in the LICENSE file.                                      -->
  <!-- ====================================================================== -->
  
  <!-- ====================================================================== -->
  <!-- @author [EMAIL PROTECTED]                                             -->
  <!-- @author [EMAIL PROTECTED]                                          -->
  <!-- @version $Id: unitTesting.xml,v 1.1 2001/09/28 12:02:48 vhardy Exp $  -->
  <!-- ====================================================================== -->
  <testSuite name="org.apache.batik.util Unit Testing">
  
      <!-- ====================================================================== -->
      <!--                         Base64 Tests                                   -->
      <!-- ====================================================================== -->
  
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="ENCODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/zeroByte" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/zeroByte.64" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="DECODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/zeroByte.64" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/zeroByte" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/zeroByte" />
      </test>
  
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="ENCODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/oneByte" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/oneByte.64" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="DECODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/oneByte.64" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/oneByte" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/oneByte" />
      </test>
  
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="ENCODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/twoByte" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/twoByte.64" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="DECODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/twoByte.64" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/twoByte" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/twoByte" />
      </test>
  
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="ENCODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/threeByte" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/threeByte.64" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="DECODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/threeByte.64" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/threeByte" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/threeByte" />
      </test>
  
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="ENCODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/fourByte" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/fourByte.64" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="DECODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/fourByte.64" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/fourByte" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/fourByte" />
      </test>
  
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="ENCODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/tenByte" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/tenByte.64" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="DECODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/tenByte.64" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/tenByte" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/tenByte" />
      </test>
  
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="ENCODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/small" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/small.64" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="DECODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/small.64" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/small" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/small" />
      </test>
  
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="ENCODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/medium" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/medium.64" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="DECODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/medium.64" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/medium" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.lang.String" value="DECODE" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/medium.pc.64" />
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/medium" />
      </test>
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/medium" />
      </test>
  
      <test class="org.apache.batik.util.Base64Test">
          <arg class="java.net.URL" 
value="file:test-references/org/apache/batik/util/large" />
      </test>
  
  
      <!-- ====================================================================== -->
      <!--                         ParsedURL Tests                                -->
      <!-- ====================================================================== -->
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test simple parsing -->
          <arg class="java.lang.String" value="xml.apache.org" />
          <arg class="java.lang.String" value="//xml.apache.org" />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test simple parsing -->
          <arg class="java.lang.String" value="fooz:/home/deweese/.cshrc" />
          <arg class="java.lang.String" value="fooz:/home/deweese/.cshrc" />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test simple parsing -->
          <arg class="java.lang.String" value="fazz:///home/deweese/.cshrc" />
          <arg class="java.lang.String" value="fazz:/home/deweese/.cshrc" />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test simple parsing of single URL -->
          <arg class="java.lang.String" 
               value="fooz://www.com:1234/home/deweese/.cshrc#abcd" />
          <arg class="java.lang.String" 
               value="fooz://www.com:1234/home/deweese/.cshrc#abcd" />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test relative url off root -->
          <arg class="java.lang.String" value="http://xml.apache.org/"; />
          <arg class="java.lang.String" value="~deweese" />
          <arg class="java.lang.String" value="http://xml.apache.org/~deweese"; />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test relative url off file in root dir -->
          <arg class="java.lang.String" value="file:///xml.apache.org" />
          <arg class="java.lang.String" value="~deweese" />
          <arg class="java.lang.String" value="file:/~deweese" />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test relative with partial path and fragement ident -->
          <arg class="java.lang.String" 
               value="fooz://www.com:1234/home/deweese/.cshrc#abcd" />
          <arg class="java.lang.String" 
               value="xyz.html#efgh" />
          <arg class="java.lang.String" 
               value="fooz://www.com:1234/home/deweese/xyz.html#efgh" />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test relative with absolute path and fragement ident -->
          <arg class="java.lang.String" 
               value="fooz://www.com:1234/home/deweese/xyz.html#efgh" />
          <arg class="java.lang.String" 
               value="/xyz.svg#ijkl" />
          <arg class="java.lang.String" 
               value="fooz://www.com:1234/xyz.svg#ijkl" />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test relative with matching protocol -->
          <arg class="java.lang.String" 
               value="file:/home/deweese/test.txt" />
          <arg class="java.lang.String" 
               value="file:junk.html" />
          <arg class="java.lang.String" 
               value="file:/home/deweese/junk.html" />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test just keeping protocol -->
          <arg class="java.lang.String" value="http://xml.apache.org/batik/"; />
          <arg class="java.lang.String" value="//jakarta.apache.org/ant/" />
          <arg class="java.lang.String" value="http://jakarta.apache.org/ant/"; />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test references to same document -->
          <arg class="java.lang.String" 
               value="http://xml.apache.org/batik/#test"; />
          <arg class="java.lang.String" value="" />
          <arg class="java.lang.String" 
               value="http://xml.apache.org/batik/#test"; />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test relative with absolute path to root -->
          <arg class="java.lang.String" value="http://xml.apache.org/batik/"; />
          <arg class="java.lang.String" value="/" />
          <arg class="java.lang.String" value="http://xml.apache.org/"; />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test relative with absolute path to item -->
          <arg class="java.lang.String" value="http://xml.apache.org/batik/"; />
          <arg class="java.lang.String" value="/fop/" />
          <arg class="java.lang.String" value="http://xml.apache.org/fop/"; />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test relative with absolute path to item -->
          <arg class="java.lang.String" value="file:helloWorld.svg" />
          <arg class="java.lang.String" value="file:test.svg#Foo" />
          <arg class="java.lang.String" value="file:test.svg#Foo" />
      </test>
      <test class="org.apache.batik.util.ParsedURLTest">
          <!-- Test relative with absolute path to item -->
          <arg class="java.lang.String" value="file:" />
          <arg class="java.lang.String" value="file:junk.svg#Bar" />
          <arg class="java.lang.String" value="file:junk.svg#Bar" />
      </test>
  
  </testSuite>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to