You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by je...@apache.org on 2007/11/07 11:18:58 UTC
svn commit: r592684 -
/xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/image/writer/internal/TIFFImageWriterTest.java
Author: jeremias
Date: Wed Nov 7 02:18:55 2007
New Revision: 592684
URL: http://svn.apache.org/viewvc?rev=592684&view=rev
Log:
Added regression test for the case where no ImageWriterParams are given.
(belongs to revision 592680)
Modified:
xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/image/writer/internal/TIFFImageWriterTest.java
Modified: xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/image/writer/internal/TIFFImageWriterTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/image/writer/internal/TIFFImageWriterTest.java?rev=592684&r1=592683&r2=592684&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/image/writer/internal/TIFFImageWriterTest.java (original)
+++ xmlgraphics/commons/trunk/test/java/org/apache/xmlgraphics/image/writer/internal/TIFFImageWriterTest.java Wed Nov 7 02:18:55 2007
@@ -31,6 +31,14 @@
public class TIFFImageWriterTest extends TestCase {
public void testJPEGWritingWithoutParams() throws Exception {
+ //This used to generate a NPE when no ImageWriterParams were not set
+ OutputStream out = new NullOutputStream();
+ org.apache.xmlgraphics.image.writer.ImageWriter imageWriter = new TIFFImageWriter();
+ BufferedImage image = new BufferedImage(200, 200, BufferedImage.TYPE_BYTE_GRAY);
+ imageWriter.writeImage(image, out);
+ }
+
+ public void testJPEGWritingWithoutJPEGParams() throws Exception {
//This used to generate a NPE because the JPEG encoding params were not set
OutputStream out = new NullOutputStream();
org.apache.xmlgraphics.image.writer.ImageWriter imageWriter = new TIFFImageWriter();
---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org