commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dam...@apache.org
Subject svn commit: r1086841 - /commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java
Date Wed, 30 Mar 2011 05:09:36 GMT
Author: damjan
Date: Wed Mar 30 05:09:36 2011
New Revision: 1086841

URL: http://svn.apache.org/viewvc?rev=1086841&view=rev
Log:
Only check for identical outputs in round trip tests
if the identicalSecondWrite field is set.

Modified:
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java?rev=1086841&r1=1086840&r2=1086841&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java
(original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java
Wed Mar 30 05:09:36 2011
@@ -433,12 +433,15 @@ public class RoundtripTest extends Sanse
             compareImagesExact(testImage, image2);
         }
 
-        File temp2 = createTempFile(tempPrefix + ".", "."
-                + formatInfo.format.extension);
-        // Debug.debug("tempFile: " + tempFile.getName());
-        Sanselan.writeImage(image2, temp2, formatInfo.format, params);
+        if (formatInfo.identicalSecondWrite)
+        {
+            File temp2 = createTempFile(tempPrefix + ".", "."
+                    + formatInfo.format.extension);
+            // Debug.debug("tempFile: " + tempFile.getName());
+            Sanselan.writeImage(image2, temp2, formatInfo.format, params);
 
-        compareFilesExact(temp1, temp2);
+            compareFilesExact(temp1, temp2);
+        }
     }
 
 }



Mime
View raw message