harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r496128 - /harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/RasterTest.java
Date Sun, 14 Jan 2007 20:09:27 GMT
Author: hindessm
Date: Sun Jan 14 12:09:27 2007
New Revision: 496128

URL: http://svn.apache.org/viewvc?view=rev&rev=496128
Log:
Remove verbose printing.
Let junit handle the unexpected exceptions.
Remove the redundant 'import java.awt.*;'.

Modified:
    harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/RasterTest.java

Modified: harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/RasterTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/RasterTest.java?view=diff&rev=496128&r1=496127&r2=496128
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/RasterTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/RasterTest.java
Sun Jan 14 12:09:27 2007
@@ -21,19 +21,14 @@
 import junit.framework.TestCase;
 import java.awt.Point;
 
-import java.awt.*;
-
 public class RasterTest extends TestCase {
     // Regression test for harmony-2717
-    public void test_createPackedRaster()
-    {
+    public void test_createPackedRaster() throws RasterFormatException {
         try {
             Raster.createPackedRaster(null, -32, Integer.MAX_VALUE, 35, new int[] {}, null);
             fail("Exception expected");
         } catch (NullPointerException expectedException) {
-            System.out.println(expectedException +" was thrown");
-        } catch (RasterFormatException expectedException) {
-            fail(expectedException +" was thrown");
+            // Expected
         }
     }
     
@@ -52,18 +47,19 @@
     }
 
     // Regression test for Harmony-2743
-    public void test_createCompatibleWritableRaster() {
+    public void test_createCompatibleWritableRaster()
+            throws IllegalArgumentException {
         MultiPixelPackedSampleModel localMultiPixelPackedSampleModel =
                 new MultiPixelPackedSampleModel(0, 5, 22, -1, -25, 40825);
         Point localPoint = new Point();
-        Raster localRaster = Raster.createWritableRaster(localMultiPixelPackedSampleModel,localPoint);
+        Raster localRaster =
+            Raster.createWritableRaster(localMultiPixelPackedSampleModel,
+                                        localPoint);
         try {
             localRaster.createCompatibleWritableRaster(-32,8);
             fail("Exception expected");
         } catch (RasterFormatException expectedException) {
-            System.out.println(expectedException +" was thrown");
-        } catch (IllegalArgumentException expectedException) {
-            fail(expectedException +" was thrown");
+            // Expected
         }
     }
 }



Mime
View raw message