You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2011/12/20 19:47:18 UTC

svn commit: r1221426 - /commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/jpeg/exif/WriteTagsTest.java

Author: sebb
Date: Tue Dec 20 18:47:18 2011
New Revision: 1221426

URL: http://svn.apache.org/viewvc?rev=1221426&view=rev
Log:
Rewrite unnecessarily complicated test logic

Modified:
    commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/jpeg/exif/WriteTagsTest.java

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/jpeg/exif/WriteTagsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/jpeg/exif/WriteTagsTest.java?rev=1221426&r1=1221425&r2=1221426&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/jpeg/exif/WriteTagsTest.java (original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/commons/sanselan/formats/jpeg/exif/WriteTagsTest.java Tue Dec 20 18:47:18 2011
@@ -17,44 +17,27 @@
 
 package org.apache.commons.sanselan.formats.jpeg.exif;
 
-import org.apache.commons.sanselan.ImageWriteException;
 import org.apache.commons.sanselan.SanselanConstants;
 import org.apache.commons.sanselan.common.BinaryConstants;
 import org.apache.commons.sanselan.formats.tiff.constants.TiffConstants;
 import org.apache.commons.sanselan.formats.tiff.write.TiffOutputField;
-import org.apache.commons.sanselan.util.Debug;
 
 public class WriteTagsTest extends ExifBaseTest implements SanselanConstants
 {
 
-    public void test() throws Exception
+    public void test2SHORTS() throws Exception
     {
-        boolean worked;
-
-        // 2 SHORTs
-        worked = true;
-        try {
-            TiffOutputField pageNumber = TiffOutputField.create(
-                TiffConstants.EXIF_TAG_PAGE_NUMBER,
-                BinaryConstants.BYTE_ORDER_LITTLE_ENDIAN,
-                new Integer[] { new Integer(1), new Integer(10) } );
-        } catch (ImageWriteException e) {
-            Debug.debug(e);
-            worked = false;
-        }
-        assertTrue(worked);
+        TiffOutputField.create(
+            TiffConstants.EXIF_TAG_PAGE_NUMBER,
+            BinaryConstants.BYTE_ORDER_LITTLE_ENDIAN,
+            new Integer[] { new Integer(1), new Integer(10) } );
+    }
 
-        // any number of SHORTS
-        worked = true;
-        try {
-            TiffOutputField gpsAreaInfo = TiffOutputField.create(
-                TiffConstants.TIFF_TAG_BITS_PER_SAMPLE,
-                BinaryConstants.BYTE_ORDER_LITTLE_ENDIAN,
-                new Integer[] { new Integer(1), new Integer(1) } );
-        } catch (ImageWriteException e) {
-            Debug.debug(e);
-            worked = false;
-        }
-        assertTrue(worked);
+    public void testSHORTS() throws Exception
+    {
+        TiffOutputField.create(
+            TiffConstants.TIFF_TAG_BITS_PER_SAMPLE,
+            BinaryConstants.BYTE_ORDER_LITTLE_ENDIAN,
+            new Integer[] { new Integer(1), new Integer(1) } );
     }
 }