harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r465495 [4/5] - in /incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common: java/awt/ java/awt/color/ java/awt/datatransfer/ java/awt/dnd/ java/awt/event/ java/awt/font/ java/awt/geom/ java/awt/image/ org/apache/harm...
Date Thu, 19 Oct 2006 05:18:24 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferFloatTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferFloatTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferFloatTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferFloatTest.java Wed Oct 18 22:18:19 2006
@@ -32,13 +32,7 @@
     int arraySize = 20;
     int size = 10;
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(DataBufferFloatTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         float dataArrays[][] = new float[numBanks][];
@@ -239,7 +233,7 @@
         for(int i = 0; i < db1.getNumBanks(); i++){
             data = db1.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -252,7 +246,7 @@
         for(int i = 0; i < db2.getNumBanks(); i++){
             data = db2.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -265,7 +259,7 @@
         for(int i = 0; i < db3.getNumBanks(); i++){
             data = db3.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -278,7 +272,7 @@
         for(int i = 0; i < db4.getNumBanks(); i++){
             data = db4.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -291,7 +285,7 @@
         for(int i = 0; i < db5.getNumBanks(); i++){
             data = db5.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -304,7 +298,7 @@
         for(int i = 0; i < db6.getNumBanks(); i++){
             data = db6.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -320,7 +314,7 @@
         data = db1.getData();
         offset = db1.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
@@ -329,7 +323,7 @@
         data = db2.getData();
         offset = db2.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
@@ -338,7 +332,7 @@
         data = db3.getData();
         offset = db3.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
@@ -347,7 +341,7 @@
         data = db4.getData();
         offset = db4.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
@@ -356,7 +350,7 @@
         data = db5.getData();
         offset = db5.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
@@ -365,7 +359,7 @@
         data = db6.getData();
         offset = db6.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
     }
 
@@ -377,7 +371,7 @@
         for(int i = 0; i < db1.getNumBanks(); i++){
             data = db1.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db1.getNumBanks(); i++){
@@ -390,7 +384,7 @@
         for(int i = 0; i < db2.getNumBanks(); i++){
             data = db2.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db2.getNumBanks(); i++){
@@ -403,7 +397,7 @@
         for(int i = 0; i < db3.getNumBanks(); i++){
             data = db3.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db3.getNumBanks(); i++){
@@ -416,7 +410,7 @@
         for(int i = 0; i < db4.getNumBanks(); i++){
             data = db4.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db4.getNumBanks(); i++){
@@ -429,7 +423,7 @@
         for(int i = 0; i < db5.getNumBanks(); i++){
             data = db5.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db5.getNumBanks(); i++){
@@ -442,7 +436,7 @@
         for(int i = 0; i < db6.getNumBanks(); i++){
             data = db6.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db6.getNumBanks(); i++){
@@ -459,7 +453,7 @@
         data = db1.getData();
         offset = db1.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db1.getElem(i));
@@ -468,7 +462,7 @@
         data = db2.getData();
         offset = db2.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db2.getElem(i));
@@ -477,7 +471,7 @@
         data = db3.getData();
         offset = db3.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db3.getElem(i));
@@ -486,7 +480,7 @@
         data = db4.getData();
         offset = db4.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db4.getElem(i));
@@ -495,7 +489,7 @@
         data = db5.getData();
         offset = db5.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db5.getElem(i));
@@ -504,7 +498,7 @@
         data = db6.getData();
         offset = db6.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db6.getElem(i));
@@ -517,79 +511,79 @@
 
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < db1.getSize(); j++){
-                db1.setElemFloat(i, j, (float)j);
+                db1.setElemFloat(i, j, j);
             }
         }
         offsets = db1.getOffsets();
         for(int i = 0; i < db1.getNumBanks(); i++){
             data = db1.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < db2.getSize(); j++){
-                db2.setElemFloat(i, j, (float)j);
+                db2.setElemFloat(i, j, j);
             }
         }
         offsets = db2.getOffsets();
         for(int i = 0; i < db2.getNumBanks(); i++){
             data = db2.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < db3.getSize(); j++){
-                db3.setElemFloat(i, j, (float)j);
+                db3.setElemFloat(i, j, j);
             }
         }
         offsets = db3.getOffsets();
         for(int i = 0; i < db3.getNumBanks(); i++){
             data = db3.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < db4.getSize(); j++){
-                db4.setElemFloat(i, j, (float)j);
+                db4.setElemFloat(i, j, j);
             }
         }
         offsets = db4.getOffsets();
         for(int i = 0; i < db4.getNumBanks(); i++){
             data = db4.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < db5.getSize(); j++){
-                db5.setElemFloat(i, j, (float)j);
+                db5.setElemFloat(i, j, j);
             }
         }
         offsets = db5.getOffsets();
         for(int i = 0; i < db5.getNumBanks(); i++){
             data = db5.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < db6.getSize(); j++){
-                db6.setElemFloat(i, j, (float)j);
+                db6.setElemFloat(i, j, j);
             }
         }
         offsets = db6.getOffsets();
         for(int i = 0; i < db6.getNumBanks(); i++){
             data = db6.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -600,57 +594,57 @@
         int offset;
 
         for(int i = 0; i < size; i++){
-            db1.setElemFloat(i, (float)i);
+            db1.setElemFloat(i, i);
         }
         data = db1.getData();
         offset = db1.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
-            db2.setElemFloat(i, (float)i);
+            db2.setElemFloat(i, i);
         }
         data = db2.getData();
         offset = db2.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
-            db3.setElemFloat(i, (float)i);
+            db3.setElemFloat(i, i);
         }
         data = db3.getData();
         offset = db3.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
-            db4.setElemFloat(i, (float)i);
+            db4.setElemFloat(i, i);
         }
         data = db4.getData();
         offset = db4.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
-            db5.setElemFloat(i, (float)i);
+            db5.setElemFloat(i, i);
         }
         data = db5.getData();
         offset = db5.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
-            db6.setElemFloat(i, (float)i);
+            db6.setElemFloat(i, i);
         }
         data = db6.getData();
         offset = db6.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
     }
 
@@ -662,12 +656,12 @@
         for(int i = 0; i < db1.getNumBanks(); i++){
             data = db1.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db1.getElemFloat(i, j), 0f);
+                assertEquals(j, db1.getElemFloat(i, j), 0f);
             }
         }
 
@@ -675,12 +669,12 @@
         for(int i = 0; i < db2.getNumBanks(); i++){
             data = db2.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db2.getElem(i, j), 0f);
+                assertEquals(j, db2.getElem(i, j), 0f);
             }
         }
 
@@ -688,12 +682,12 @@
         for(int i = 0; i < db3.getNumBanks(); i++){
             data = db3.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db3.getElemFloat(i, j), 0f);
+                assertEquals(j, db3.getElemFloat(i, j), 0f);
             }
         }
 
@@ -701,12 +695,12 @@
         for(int i = 0; i < db4.getNumBanks(); i++){
             data = db4.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db4.getElemFloat(i, j), 0f);
+                assertEquals(j, db4.getElemFloat(i, j), 0f);
             }
         }
 
@@ -714,12 +708,12 @@
         for(int i = 0; i < db5.getNumBanks(); i++){
             data = db5.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db5.getElemFloat(i, j), 0f);
+                assertEquals(j, db5.getElemFloat(i, j), 0f);
             }
         }
 
@@ -727,12 +721,12 @@
         for(int i = 0; i < db6.getNumBanks(); i++){
             data = db6.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db6.getElemFloat(i, j), 0f);
+                assertEquals(j, db6.getElemFloat(i, j), 0f);
             }
         }
     }
@@ -744,55 +738,55 @@
         data = db1.getData();
         offset = db1.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db1.getElemFloat(i), 0f);
+            assertEquals(i, db1.getElemFloat(i), 0f);
         }
 
         data = db2.getData();
         offset = db2.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db2.getElemFloat(i), 0f);
+            assertEquals(i, db2.getElemFloat(i), 0f);
         }
 
         data = db3.getData();
         offset = db3.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db3.getElemFloat(i), 0f);
+            assertEquals(i, db3.getElemFloat(i), 0f);
         }
 
         data = db4.getData();
         offset = db4.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db4.getElemFloat(i), 0f);
+            assertEquals(i, db4.getElemFloat(i), 0f);
         }
 
         data = db5.getData();
         offset = db5.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db5.getElemFloat(i), 0f);
+            assertEquals(i, db5.getElemFloat(i), 0f);
         }
 
         data = db6.getData();
         offset = db6.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db6.getElemFloat(i), 0f);
+            assertEquals(i, db6.getElemFloat(i), 0f);
         }
     }
 
@@ -802,79 +796,79 @@
 
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < db1.getSize(); j++){
-                db1.setElemDouble(i, j, (double)j);
+                db1.setElemDouble(i, j, j);
             }
         }
         offsets = db1.getOffsets();
         for(int i = 0; i < db1.getNumBanks(); i++){
             data = db1.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < db2.getSize(); j++){
-                db2.setElemDouble(i, j, (double)j);
+                db2.setElemDouble(i, j, j);
             }
         }
         offsets = db2.getOffsets();
         for(int i = 0; i < db2.getNumBanks(); i++){
             data = db2.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < db3.getSize(); j++){
-                db3.setElemDouble(i, j, (double)j);
+                db3.setElemDouble(i, j, j);
             }
         }
         offsets = db3.getOffsets();
         for(int i = 0; i < db3.getNumBanks(); i++){
             data = db3.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < db4.getSize(); j++){
-                db4.setElemDouble(i, j, (double)j);
+                db4.setElemDouble(i, j, j);
             }
         }
         offsets = db4.getOffsets();
         for(int i = 0; i < db4.getNumBanks(); i++){
             data = db4.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < db5.getSize(); j++){
-                db5.setElemDouble(i, j, (double)j);
+                db5.setElemDouble(i, j, j);
             }
         }
         offsets = db5.getOffsets();
         for(int i = 0; i < db5.getNumBanks(); i++){
             data = db5.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < db6.getSize(); j++){
-                db6.setElemDouble(i, j, (double)j);
+                db6.setElemDouble(i, j, j);
             }
         }
         offsets = db6.getOffsets();
         for(int i = 0; i < db6.getNumBanks(); i++){
             data = db6.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -886,57 +880,57 @@
         int offset;
 
         for(int i = 0; i < size; i++){
-            db1.setElemDouble(i, (double)i);
+            db1.setElemDouble(i, i);
         }
         data = db1.getData();
         offset = db1.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
-            db2.setElemDouble(i, (double)i);
+            db2.setElemDouble(i, i);
         }
         data = db2.getData();
         offset = db2.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
-            db3.setElemDouble(i, (double)i);
+            db3.setElemDouble(i, i);
         }
         data = db3.getData();
         offset = db3.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
-            db4.setElemDouble(i, (double)i);
+            db4.setElemDouble(i, i);
         }
         data = db4.getData();
         offset = db4.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
-            db5.setElemDouble(i, (double)i);
+            db5.setElemDouble(i, i);
         }
         data = db5.getData();
         offset = db5.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
-            db6.setElemDouble(i, (double)i);
+            db6.setElemDouble(i, i);
         }
         data = db6.getData();
         offset = db6.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
     }
 
@@ -948,12 +942,12 @@
         for(int i = 0; i < db1.getNumBanks(); i++){
             data = db1.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db1.getElemDouble(i, j), 0);
+                assertEquals(j, db1.getElemDouble(i, j), 0);
             }
         }
 
@@ -961,12 +955,12 @@
         for(int i = 0; i < db2.getNumBanks(); i++){
             data = db2.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db2.getElemDouble(i, j), 0);
+                assertEquals(j, db2.getElemDouble(i, j), 0);
             }
         }
 
@@ -974,12 +968,12 @@
         for(int i = 0; i < db3.getNumBanks(); i++){
             data = db3.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db3.getElemDouble(i, j), 0);
+                assertEquals(j, db3.getElemDouble(i, j), 0);
             }
         }
 
@@ -987,12 +981,12 @@
         for(int i = 0; i < db4.getNumBanks(); i++){
             data = db4.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db4.getElemDouble(i, j), 0);
+                assertEquals(j, db4.getElemDouble(i, j), 0);
             }
         }
 
@@ -1000,12 +994,12 @@
         for(int i = 0; i < db5.getNumBanks(); i++){
             data = db5.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db5.getElemDouble(i, j), 0);
+                assertEquals(j, db5.getElemDouble(i, j), 0);
             }
         }
 
@@ -1013,12 +1007,12 @@
         for(int i = 0; i < db6.getNumBanks(); i++){
             data = db6.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (float) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db6.getElemDouble(i, j), 0);
+                assertEquals(j, db6.getElemDouble(i, j), 0);
             }
         }
     }
@@ -1030,55 +1024,55 @@
         data = db1.getData();
         offset = db1.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db1.getElemDouble(i), 0);
+            assertEquals(i, db1.getElemDouble(i), 0);
         }
 
         data = db2.getData();
         offset = db2.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db2.getElemDouble(i), 0);
+            assertEquals(i, db2.getElemDouble(i), 0);
         }
 
         data = db3.getData();
         offset = db3.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db3.getElemDouble(i), 0);
+            assertEquals(i, db3.getElemDouble(i), 0);
         }
 
         data = db4.getData();
         offset = db4.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db4.getElemDouble(i), 0);
+            assertEquals(i, db4.getElemDouble(i), 0);
         }
 
         data = db5.getData();
         offset = db5.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db5.getElemDouble(i), 0);
+            assertEquals(i, db5.getElemDouble(i), 0);
         }
 
         data = db6.getData();
         offset = db6.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (float) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db6.getElemDouble(i), 0);
+            assertEquals(i, db6.getElemDouble(i), 0);
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferIntTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferIntTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferIntTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferIntTest.java Wed Oct 18 22:18:19 2006
@@ -39,6 +39,7 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         int dataArrays[][] = new int[numBanks][];
@@ -517,7 +518,7 @@
 
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < db1.getSize(); j++){
-                db1.setElemFloat(i, j, (float)j);
+                db1.setElemFloat(i, j, j);
             }
         }
         offsets = db1.getOffsets();
@@ -530,7 +531,7 @@
 
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < db2.getSize(); j++){
-                db2.setElemFloat(i, j, (float)j);
+                db2.setElemFloat(i, j, j);
             }
         }
         offsets = db2.getOffsets();
@@ -543,7 +544,7 @@
 
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < db3.getSize(); j++){
-                db3.setElemFloat(i, j, (float)j);
+                db3.setElemFloat(i, j, j);
             }
         }
         offsets = db3.getOffsets();
@@ -556,7 +557,7 @@
 
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < db4.getSize(); j++){
-                db4.setElemFloat(i, j, (float)j);
+                db4.setElemFloat(i, j, j);
             }
         }
         offsets = db4.getOffsets();
@@ -569,7 +570,7 @@
 
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < db5.getSize(); j++){
-                db5.setElemFloat(i, j, (float)j);
+                db5.setElemFloat(i, j, j);
             }
         }
         offsets = db5.getOffsets();
@@ -582,7 +583,7 @@
 
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < db6.getSize(); j++){
-                db6.setElemFloat(i, j, (float)j);
+                db6.setElemFloat(i, j, j);
             }
         }
         offsets = db6.getOffsets();
@@ -600,7 +601,7 @@
         int offset;
 
         for(int i = 0; i < size; i++){
-            db1.setElemFloat(i, (float)i);
+            db1.setElemFloat(i, i);
         }
         data = db1.getData();
         offset = db1.getOffset();
@@ -609,7 +610,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db2.setElemFloat(i, (float)i);
+            db2.setElemFloat(i, i);
         }
         data = db2.getData();
         offset = db2.getOffset();
@@ -618,7 +619,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db3.setElemFloat(i, (float)i);
+            db3.setElemFloat(i, i);
         }
         data = db3.getData();
         offset = db3.getOffset();
@@ -627,7 +628,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db4.setElemFloat(i, (float)i);
+            db4.setElemFloat(i, i);
         }
         data = db4.getData();
         offset = db4.getOffset();
@@ -636,7 +637,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db5.setElemFloat(i, (float)i);
+            db5.setElemFloat(i, i);
         }
         data = db5.getData();
         offset = db5.getOffset();
@@ -645,7 +646,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db6.setElemFloat(i, (float)i);
+            db6.setElemFloat(i, i);
         }
         data = db6.getData();
         offset = db6.getOffset();
@@ -667,7 +668,7 @@
         }
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db1.getElemFloat(i, j), 0f);
+                assertEquals(j, db1.getElemFloat(i, j), 0f);
             }
         }
 
@@ -680,7 +681,7 @@
         }
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db2.getElem(i, j), 0f);
+                assertEquals(j, db2.getElem(i, j), 0f);
             }
         }
 
@@ -693,7 +694,7 @@
         }
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db3.getElemFloat(i, j), 0f);
+                assertEquals(j, db3.getElemFloat(i, j), 0f);
             }
         }
 
@@ -706,7 +707,7 @@
         }
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db4.getElemFloat(i, j), 0f);
+                assertEquals(j, db4.getElemFloat(i, j), 0f);
             }
         }
 
@@ -719,7 +720,7 @@
         }
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db5.getElemFloat(i, j), 0f);
+                assertEquals(j, db5.getElemFloat(i, j), 0f);
             }
         }
 
@@ -732,7 +733,7 @@
         }
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db6.getElemFloat(i, j), 0f);
+                assertEquals(j, db6.getElemFloat(i, j), 0f);
             }
         }
     }
@@ -747,7 +748,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db1.getElemFloat(i), 0f);
+            assertEquals(i, db1.getElemFloat(i), 0f);
         }
 
         data = db2.getData();
@@ -756,7 +757,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db2.getElemFloat(i), 0f);
+            assertEquals(i, db2.getElemFloat(i), 0f);
         }
 
         data = db3.getData();
@@ -765,7 +766,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db3.getElemFloat(i), 0f);
+            assertEquals(i, db3.getElemFloat(i), 0f);
         }
 
         data = db4.getData();
@@ -774,7 +775,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db4.getElemFloat(i), 0f);
+            assertEquals(i, db4.getElemFloat(i), 0f);
         }
 
         data = db5.getData();
@@ -783,7 +784,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db5.getElemFloat(i), 0f);
+            assertEquals(i, db5.getElemFloat(i), 0f);
         }
 
         data = db6.getData();
@@ -792,7 +793,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db6.getElemFloat(i), 0f);
+            assertEquals(i, db6.getElemFloat(i), 0f);
         }
     }
 
@@ -802,7 +803,7 @@
 
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < db1.getSize(); j++){
-                db1.setElemDouble(i, j, (double)j);
+                db1.setElemDouble(i, j, j);
             }
         }
         offsets = db1.getOffsets();
@@ -815,7 +816,7 @@
 
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < db2.getSize(); j++){
-                db2.setElemDouble(i, j, (double)j);
+                db2.setElemDouble(i, j, j);
             }
         }
         offsets = db2.getOffsets();
@@ -828,7 +829,7 @@
 
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < db3.getSize(); j++){
-                db3.setElemDouble(i, j, (double)j);
+                db3.setElemDouble(i, j, j);
             }
         }
         offsets = db3.getOffsets();
@@ -841,7 +842,7 @@
 
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < db4.getSize(); j++){
-                db4.setElemDouble(i, j, (double)j);
+                db4.setElemDouble(i, j, j);
             }
         }
         offsets = db4.getOffsets();
@@ -854,7 +855,7 @@
 
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < db5.getSize(); j++){
-                db5.setElemDouble(i, j, (double)j);
+                db5.setElemDouble(i, j, j);
             }
         }
         offsets = db5.getOffsets();
@@ -867,7 +868,7 @@
 
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < db6.getSize(); j++){
-                db6.setElemDouble(i, j, (double)j);
+                db6.setElemDouble(i, j, j);
             }
         }
         offsets = db6.getOffsets();
@@ -886,7 +887,7 @@
         int offset;
 
         for(int i = 0; i < size; i++){
-            db1.setElemDouble(i, (double)i);
+            db1.setElemDouble(i, i);
         }
         data = db1.getData();
         offset = db1.getOffset();
@@ -895,7 +896,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db2.setElemDouble(i, (double)i);
+            db2.setElemDouble(i, i);
         }
         data = db2.getData();
         offset = db2.getOffset();
@@ -904,7 +905,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db3.setElemDouble(i, (double)i);
+            db3.setElemDouble(i, i);
         }
         data = db3.getData();
         offset = db3.getOffset();
@@ -913,7 +914,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db4.setElemDouble(i, (double)i);
+            db4.setElemDouble(i, i);
         }
         data = db4.getData();
         offset = db4.getOffset();
@@ -922,7 +923,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db5.setElemDouble(i, (double)i);
+            db5.setElemDouble(i, i);
         }
         data = db5.getData();
         offset = db5.getOffset();
@@ -931,7 +932,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db6.setElemDouble(i, (double)i);
+            db6.setElemDouble(i, i);
         }
         data = db6.getData();
         offset = db6.getOffset();
@@ -953,7 +954,7 @@
         }
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db1.getElemDouble(i, j), 0);
+                assertEquals(j, db1.getElemDouble(i, j), 0);
             }
         }
 
@@ -966,7 +967,7 @@
         }
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db2.getElemDouble(i, j), 0);
+                assertEquals(j, db2.getElemDouble(i, j), 0);
             }
         }
 
@@ -979,7 +980,7 @@
         }
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db3.getElemDouble(i, j), 0);
+                assertEquals(j, db3.getElemDouble(i, j), 0);
             }
         }
 
@@ -992,7 +993,7 @@
         }
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db4.getElemDouble(i, j), 0);
+                assertEquals(j, db4.getElemDouble(i, j), 0);
             }
         }
 
@@ -1005,7 +1006,7 @@
         }
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db5.getElemDouble(i, j), 0);
+                assertEquals(j, db5.getElemDouble(i, j), 0);
             }
         }
 
@@ -1018,7 +1019,7 @@
         }
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db6.getElemDouble(i, j), 0);
+                assertEquals(j, db6.getElemDouble(i, j), 0);
             }
         }
     }
@@ -1033,7 +1034,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db1.getElemDouble(i), 0);
+            assertEquals(i, db1.getElemDouble(i), 0);
         }
 
         data = db2.getData();
@@ -1042,7 +1043,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db2.getElemDouble(i), 0);
+            assertEquals(i, db2.getElemDouble(i), 0);
         }
 
         data = db3.getData();
@@ -1051,7 +1052,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db3.getElemDouble(i), 0);
+            assertEquals(i, db3.getElemDouble(i), 0);
         }
 
         data = db4.getData();
@@ -1060,7 +1061,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db4.getElemDouble(i), 0);
+            assertEquals(i, db4.getElemDouble(i), 0);
         }
 
         data = db5.getData();
@@ -1069,7 +1070,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db5.getElemDouble(i), 0);
+            assertEquals(i, db5.getElemDouble(i), 0);
         }
 
         data = db6.getData();
@@ -1078,7 +1079,7 @@
             data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db6.getElemDouble(i), 0);
+            assertEquals(i, db6.getElemDouble(i), 0);
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferShortTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferShortTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferShortTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferShortTest.java Wed Oct 18 22:18:19 2006
@@ -39,6 +39,7 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         short dataArrays[][] = new short[numBanks][];
@@ -517,7 +518,7 @@
 
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < db1.getSize(); j++){
-                db1.setElemFloat(i, j, (float)j);
+                db1.setElemFloat(i, j, j);
             }
         }
         offsets = db1.getOffsets();
@@ -530,7 +531,7 @@
 
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < db2.getSize(); j++){
-                db2.setElemFloat(i, j, (float)j);
+                db2.setElemFloat(i, j, j);
             }
         }
         offsets = db2.getOffsets();
@@ -543,7 +544,7 @@
 
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < db3.getSize(); j++){
-                db3.setElemFloat(i, j, (float)j);
+                db3.setElemFloat(i, j, j);
             }
         }
         offsets = db3.getOffsets();
@@ -556,7 +557,7 @@
 
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < db4.getSize(); j++){
-                db4.setElemFloat(i, j, (float)j);
+                db4.setElemFloat(i, j, j);
             }
         }
         offsets = db4.getOffsets();
@@ -569,7 +570,7 @@
 
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < db5.getSize(); j++){
-                db5.setElemFloat(i, j, (float)j);
+                db5.setElemFloat(i, j, j);
             }
         }
         offsets = db5.getOffsets();
@@ -582,7 +583,7 @@
 
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < db6.getSize(); j++){
-                db6.setElemFloat(i, j, (float)j);
+                db6.setElemFloat(i, j, j);
             }
         }
         offsets = db6.getOffsets();
@@ -600,7 +601,7 @@
         int offset;
 
         for(int i = 0; i < size; i++){
-            db1.setElemFloat(i, (float)i);
+            db1.setElemFloat(i, i);
         }
         data = db1.getData();
         offset = db1.getOffset();
@@ -609,7 +610,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db2.setElemFloat(i, (float)i);
+            db2.setElemFloat(i, i);
         }
         data = db2.getData();
         offset = db2.getOffset();
@@ -618,7 +619,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db3.setElemFloat(i, (float)i);
+            db3.setElemFloat(i, i);
         }
         data = db3.getData();
         offset = db3.getOffset();
@@ -627,7 +628,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db4.setElemFloat(i, (float)i);
+            db4.setElemFloat(i, i);
         }
         data = db4.getData();
         offset = db4.getOffset();
@@ -636,7 +637,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db5.setElemFloat(i, (float)i);
+            db5.setElemFloat(i, i);
         }
         data = db5.getData();
         offset = db5.getOffset();
@@ -645,7 +646,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db6.setElemFloat(i, (float)i);
+            db6.setElemFloat(i, i);
         }
         data = db6.getData();
         offset = db6.getOffset();
@@ -667,7 +668,7 @@
         }
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db1.getElemFloat(i, j), 0f);
+                assertEquals(j, db1.getElemFloat(i, j), 0f);
             }
         }
 
@@ -680,7 +681,7 @@
         }
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db2.getElem(i, j), 0f);
+                assertEquals(j, db2.getElem(i, j), 0f);
             }
         }
 
@@ -693,7 +694,7 @@
         }
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db3.getElemFloat(i, j), 0f);
+                assertEquals(j, db3.getElemFloat(i, j), 0f);
             }
         }
 
@@ -706,7 +707,7 @@
         }
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db4.getElemFloat(i, j), 0f);
+                assertEquals(j, db4.getElemFloat(i, j), 0f);
             }
         }
 
@@ -719,7 +720,7 @@
         }
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db5.getElemFloat(i, j), 0f);
+                assertEquals(j, db5.getElemFloat(i, j), 0f);
             }
         }
 
@@ -732,7 +733,7 @@
         }
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db6.getElemFloat(i, j), 0f);
+                assertEquals(j, db6.getElemFloat(i, j), 0f);
             }
         }
     }
@@ -747,7 +748,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db1.getElemFloat(i), 0f);
+            assertEquals(i, db1.getElemFloat(i), 0f);
         }
 
         data = db2.getData();
@@ -756,7 +757,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db2.getElemFloat(i), 0f);
+            assertEquals(i, db2.getElemFloat(i), 0f);
         }
 
         data = db3.getData();
@@ -765,7 +766,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db3.getElemFloat(i), 0f);
+            assertEquals(i, db3.getElemFloat(i), 0f);
         }
 
         data = db4.getData();
@@ -774,7 +775,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db4.getElemFloat(i), 0f);
+            assertEquals(i, db4.getElemFloat(i), 0f);
         }
 
         data = db5.getData();
@@ -783,7 +784,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db5.getElemFloat(i), 0f);
+            assertEquals(i, db5.getElemFloat(i), 0f);
         }
 
         data = db6.getData();
@@ -792,7 +793,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db6.getElemFloat(i), 0f);
+            assertEquals(i, db6.getElemFloat(i), 0f);
         }
     }
 
@@ -802,7 +803,7 @@
 
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < db1.getSize(); j++){
-                db1.setElemDouble(i, j, (double)j);
+                db1.setElemDouble(i, j, j);
             }
         }
         offsets = db1.getOffsets();
@@ -815,7 +816,7 @@
 
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < db2.getSize(); j++){
-                db2.setElemDouble(i, j, (double)j);
+                db2.setElemDouble(i, j, j);
             }
         }
         offsets = db2.getOffsets();
@@ -828,7 +829,7 @@
 
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < db3.getSize(); j++){
-                db3.setElemDouble(i, j, (double)j);
+                db3.setElemDouble(i, j, j);
             }
         }
         offsets = db3.getOffsets();
@@ -841,7 +842,7 @@
 
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < db4.getSize(); j++){
-                db4.setElemDouble(i, j, (double)j);
+                db4.setElemDouble(i, j, j);
             }
         }
         offsets = db4.getOffsets();
@@ -854,7 +855,7 @@
 
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < db5.getSize(); j++){
-                db5.setElemDouble(i, j, (double)j);
+                db5.setElemDouble(i, j, j);
             }
         }
         offsets = db5.getOffsets();
@@ -867,7 +868,7 @@
 
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < db6.getSize(); j++){
-                db6.setElemDouble(i, j, (double)j);
+                db6.setElemDouble(i, j, j);
             }
         }
         offsets = db6.getOffsets();
@@ -886,7 +887,7 @@
         int offset;
 
         for(int i = 0; i < size; i++){
-            db1.setElemDouble(i, (double)i);
+            db1.setElemDouble(i, i);
         }
         data = db1.getData();
         offset = db1.getOffset();
@@ -895,7 +896,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db2.setElemDouble(i, (double)i);
+            db2.setElemDouble(i, i);
         }
         data = db2.getData();
         offset = db2.getOffset();
@@ -904,7 +905,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db3.setElemDouble(i, (double)i);
+            db3.setElemDouble(i, i);
         }
         data = db3.getData();
         offset = db3.getOffset();
@@ -913,7 +914,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db4.setElemDouble(i, (double)i);
+            db4.setElemDouble(i, i);
         }
         data = db4.getData();
         offset = db4.getOffset();
@@ -922,7 +923,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db5.setElemDouble(i, (double)i);
+            db5.setElemDouble(i, i);
         }
         data = db5.getData();
         offset = db5.getOffset();
@@ -931,7 +932,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db6.setElemDouble(i, (double)i);
+            db6.setElemDouble(i, i);
         }
         data = db6.getData();
         offset = db6.getOffset();
@@ -953,7 +954,7 @@
         }
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db1.getElemDouble(i, j), 0);
+                assertEquals(j, db1.getElemDouble(i, j), 0);
             }
         }
 
@@ -966,7 +967,7 @@
         }
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db2.getElemDouble(i, j), 0);
+                assertEquals(j, db2.getElemDouble(i, j), 0);
             }
         }
 
@@ -979,7 +980,7 @@
         }
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db3.getElemDouble(i, j), 0);
+                assertEquals(j, db3.getElemDouble(i, j), 0);
             }
         }
 
@@ -992,7 +993,7 @@
         }
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db4.getElemDouble(i, j), 0);
+                assertEquals(j, db4.getElemDouble(i, j), 0);
             }
         }
 
@@ -1005,7 +1006,7 @@
         }
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db5.getElemDouble(i, j), 0);
+                assertEquals(j, db5.getElemDouble(i, j), 0);
             }
         }
 
@@ -1018,7 +1019,7 @@
         }
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db6.getElemDouble(i, j), 0);
+                assertEquals(j, db6.getElemDouble(i, j), 0);
             }
         }
     }
@@ -1033,7 +1034,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db1.getElemDouble(i), 0);
+            assertEquals(i, db1.getElemDouble(i), 0);
         }
 
         data = db2.getData();
@@ -1042,7 +1043,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db2.getElemDouble(i), 0);
+            assertEquals(i, db2.getElemDouble(i), 0);
         }
 
         data = db3.getData();
@@ -1051,7 +1052,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db3.getElemDouble(i), 0);
+            assertEquals(i, db3.getElemDouble(i), 0);
         }
 
         data = db4.getData();
@@ -1060,7 +1061,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db4.getElemDouble(i), 0);
+            assertEquals(i, db4.getElemDouble(i), 0);
         }
 
         data = db5.getData();
@@ -1069,7 +1070,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db5.getElemDouble(i), 0);
+            assertEquals(i, db5.getElemDouble(i), 0);
         }
 
         data = db6.getData();
@@ -1078,7 +1079,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db6.getElemDouble(i), 0);
+            assertEquals(i, db6.getElemDouble(i), 0);
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferUShortTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferUShortTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferUShortTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferUShortTest.java Wed Oct 18 22:18:19 2006
@@ -40,6 +40,7 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         short dataArrays[][] = new short[numBanks][];
@@ -518,7 +519,7 @@
 
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < db1.getSize(); j++){
-                db1.setElemFloat(i, j, (float)j);
+                db1.setElemFloat(i, j, j);
             }
         }
         offsets = db1.getOffsets();
@@ -531,7 +532,7 @@
 
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < db2.getSize(); j++){
-                db2.setElemFloat(i, j, (float)j);
+                db2.setElemFloat(i, j, j);
             }
         }
         offsets = db2.getOffsets();
@@ -544,7 +545,7 @@
 
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < db3.getSize(); j++){
-                db3.setElemFloat(i, j, (float)j);
+                db3.setElemFloat(i, j, j);
             }
         }
         offsets = db3.getOffsets();
@@ -557,7 +558,7 @@
 
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < db4.getSize(); j++){
-                db4.setElemFloat(i, j, (float)j);
+                db4.setElemFloat(i, j, j);
             }
         }
         offsets = db4.getOffsets();
@@ -570,7 +571,7 @@
 
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < db5.getSize(); j++){
-                db5.setElemFloat(i, j, (float)j);
+                db5.setElemFloat(i, j, j);
             }
         }
         offsets = db5.getOffsets();
@@ -583,7 +584,7 @@
 
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < db6.getSize(); j++){
-                db6.setElemFloat(i, j, (float)j);
+                db6.setElemFloat(i, j, j);
             }
         }
         offsets = db6.getOffsets();
@@ -601,7 +602,7 @@
         int offset;
 
         for(int i = 0; i < size; i++){
-            db1.setElemFloat(i, (float)i);
+            db1.setElemFloat(i, i);
         }
         data = db1.getData();
         offset = db1.getOffset();
@@ -610,7 +611,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db2.setElemFloat(i, (float)i);
+            db2.setElemFloat(i, i);
         }
         data = db2.getData();
         offset = db2.getOffset();
@@ -619,7 +620,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db3.setElemFloat(i, (float)i);
+            db3.setElemFloat(i, i);
         }
         data = db3.getData();
         offset = db3.getOffset();
@@ -628,7 +629,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db4.setElemFloat(i, (float)i);
+            db4.setElemFloat(i, i);
         }
         data = db4.getData();
         offset = db4.getOffset();
@@ -637,7 +638,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db5.setElemFloat(i, (float)i);
+            db5.setElemFloat(i, i);
         }
         data = db5.getData();
         offset = db5.getOffset();
@@ -646,7 +647,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db6.setElemFloat(i, (float)i);
+            db6.setElemFloat(i, i);
         }
         data = db6.getData();
         offset = db6.getOffset();
@@ -668,7 +669,7 @@
         }
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db1.getElemFloat(i, j), 0f);
+                assertEquals(j, db1.getElemFloat(i, j), 0f);
             }
         }
 
@@ -681,7 +682,7 @@
         }
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db2.getElem(i, j), 0f);
+                assertEquals(j, db2.getElem(i, j), 0f);
             }
         }
 
@@ -694,7 +695,7 @@
         }
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db3.getElemFloat(i, j), 0f);
+                assertEquals(j, db3.getElemFloat(i, j), 0f);
             }
         }
 
@@ -707,7 +708,7 @@
         }
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db4.getElemFloat(i, j), 0f);
+                assertEquals(j, db4.getElemFloat(i, j), 0f);
             }
         }
 
@@ -720,7 +721,7 @@
         }
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db5.getElemFloat(i, j), 0f);
+                assertEquals(j, db5.getElemFloat(i, j), 0f);
             }
         }
 
@@ -733,7 +734,7 @@
         }
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((float)j, db6.getElemFloat(i, j), 0f);
+                assertEquals(j, db6.getElemFloat(i, j), 0f);
             }
         }
     }
@@ -748,7 +749,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db1.getElemFloat(i), 0f);
+            assertEquals(i, db1.getElemFloat(i), 0f);
         }
 
         data = db2.getData();
@@ -757,7 +758,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db2.getElemFloat(i), 0f);
+            assertEquals(i, db2.getElemFloat(i), 0f);
         }
 
         data = db3.getData();
@@ -766,7 +767,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db3.getElemFloat(i), 0f);
+            assertEquals(i, db3.getElemFloat(i), 0f);
         }
 
         data = db4.getData();
@@ -775,7 +776,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db4.getElemFloat(i), 0f);
+            assertEquals(i, db4.getElemFloat(i), 0f);
         }
 
         data = db5.getData();
@@ -784,7 +785,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db5.getElemFloat(i), 0f);
+            assertEquals(i, db5.getElemFloat(i), 0f);
         }
 
         data = db6.getData();
@@ -793,7 +794,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((float)i, db6.getElemFloat(i), 0f);
+            assertEquals(i, db6.getElemFloat(i), 0f);
         }
     }
 
@@ -803,7 +804,7 @@
 
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < db1.getSize(); j++){
-                db1.setElemDouble(i, j, (double)j);
+                db1.setElemDouble(i, j, j);
             }
         }
         offsets = db1.getOffsets();
@@ -816,7 +817,7 @@
 
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < db2.getSize(); j++){
-                db2.setElemDouble(i, j, (double)j);
+                db2.setElemDouble(i, j, j);
             }
         }
         offsets = db2.getOffsets();
@@ -829,7 +830,7 @@
 
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < db3.getSize(); j++){
-                db3.setElemDouble(i, j, (double)j);
+                db3.setElemDouble(i, j, j);
             }
         }
         offsets = db3.getOffsets();
@@ -842,7 +843,7 @@
 
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < db4.getSize(); j++){
-                db4.setElemDouble(i, j, (double)j);
+                db4.setElemDouble(i, j, j);
             }
         }
         offsets = db4.getOffsets();
@@ -855,7 +856,7 @@
 
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < db5.getSize(); j++){
-                db5.setElemDouble(i, j, (double)j);
+                db5.setElemDouble(i, j, j);
             }
         }
         offsets = db5.getOffsets();
@@ -868,7 +869,7 @@
 
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < db6.getSize(); j++){
-                db6.setElemDouble(i, j, (double)j);
+                db6.setElemDouble(i, j, j);
             }
         }
         offsets = db6.getOffsets();
@@ -887,7 +888,7 @@
         int offset;
 
         for(int i = 0; i < size; i++){
-            db1.setElemDouble(i, (double)i);
+            db1.setElemDouble(i, i);
         }
         data = db1.getData();
         offset = db1.getOffset();
@@ -896,7 +897,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db2.setElemDouble(i, (double)i);
+            db2.setElemDouble(i, i);
         }
         data = db2.getData();
         offset = db2.getOffset();
@@ -905,7 +906,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db3.setElemDouble(i, (double)i);
+            db3.setElemDouble(i, i);
         }
         data = db3.getData();
         offset = db3.getOffset();
@@ -914,7 +915,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db4.setElemDouble(i, (double)i);
+            db4.setElemDouble(i, i);
         }
         data = db4.getData();
         offset = db4.getOffset();
@@ -923,7 +924,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db5.setElemDouble(i, (double)i);
+            db5.setElemDouble(i, i);
         }
         data = db5.getData();
         offset = db5.getOffset();
@@ -932,7 +933,7 @@
         }
 
         for(int i = 0; i < size; i++){
-            db6.setElemDouble(i, (double)i);
+            db6.setElemDouble(i, i);
         }
         data = db6.getData();
         offset = db6.getOffset();
@@ -954,7 +955,7 @@
         }
         for(int i = 0; i < db1.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db1.getElemDouble(i, j), 0);
+                assertEquals(j, db1.getElemDouble(i, j), 0);
             }
         }
 
@@ -967,7 +968,7 @@
         }
         for(int i = 0; i < db2.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db2.getElemDouble(i, j), 0);
+                assertEquals(j, db2.getElemDouble(i, j), 0);
             }
         }
 
@@ -980,7 +981,7 @@
         }
         for(int i = 0; i < db3.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db3.getElemDouble(i, j), 0);
+                assertEquals(j, db3.getElemDouble(i, j), 0);
             }
         }
 
@@ -993,7 +994,7 @@
         }
         for(int i = 0; i < db4.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db4.getElemDouble(i, j), 0);
+                assertEquals(j, db4.getElemDouble(i, j), 0);
             }
         }
 
@@ -1006,7 +1007,7 @@
         }
         for(int i = 0; i < db5.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db5.getElemDouble(i, j), 0);
+                assertEquals(j, db5.getElemDouble(i, j), 0);
             }
         }
 
@@ -1019,7 +1020,7 @@
         }
         for(int i = 0; i < db6.getNumBanks(); i++){
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, db6.getElemDouble(i, j), 0);
+                assertEquals(j, db6.getElemDouble(i, j), 0);
             }
         }
     }
@@ -1034,7 +1035,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db1.getElemDouble(i), 0);
+            assertEquals(i, db1.getElemDouble(i), 0);
         }
 
         data = db2.getData();
@@ -1043,7 +1044,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db2.getElemDouble(i), 0);
+            assertEquals(i, db2.getElemDouble(i), 0);
         }
 
         data = db3.getData();
@@ -1052,7 +1053,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db3.getElemDouble(i), 0);
+            assertEquals(i, db3.getElemDouble(i), 0);
         }
 
         data = db4.getData();
@@ -1061,7 +1062,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db4.getElemDouble(i), 0);
+            assertEquals(i, db4.getElemDouble(i), 0);
         }
 
         data = db5.getData();
@@ -1070,7 +1071,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db5.getElemDouble(i), 0);
+            assertEquals(i, db5.getElemDouble(i), 0);
         }
 
         data = db6.getData();
@@ -1079,7 +1080,7 @@
             data[offset + i] = (short) i;
         }
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, db6.getElemDouble(i), 0);
+            assertEquals(i, db6.getElemDouble(i), 0);
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/IndexColorModelRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/IndexColorModelRTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/IndexColorModelRTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/IndexColorModelRTest.java Wed Oct 18 22:18:19 2006
@@ -33,6 +33,7 @@
         junit.textui.TestRunner.run(IndexColorModelRTest.class);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         r = (byte)0x1f;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/MultiPixelPackedSampleModelTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/MultiPixelPackedSampleModelTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/MultiPixelPackedSampleModelTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/MultiPixelPackedSampleModelTest.java Wed Oct 18 22:18:19 2006
@@ -67,13 +67,7 @@
     MultiPixelPackedSampleModel mppsmb1, mppsmb2, mppsmu1, mppsmu2, mppsmi1,
             mppsmi2;
 
-    public static void main(String[] args) {
-        junit.textui.TestRunner.run(MultiPixelPackedSampleModelTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
 
@@ -111,11 +105,6 @@
         //      initTestData();
     }
 
-    /**
-     * Constructor for MultiPixelPackedSampleModelTest.
-     *
-     * @param name
-     */
     public MultiPixelPackedSampleModelTest(String name) {
         super(name);
     }
@@ -349,24 +338,23 @@
     }
 
     public final void testCreateSubsetSampleModel() {
-        SampleModel sm = null;
         int bands[] = { 0 };
         int wrongBands[] = { 0, 1 };
 
         try {
-            sm = mppsmb1.createSubsetSampleModel(null);
+            mppsmb1.createSubsetSampleModel(null);
         } catch (RasterFormatException e) {
             fail();
         }
 
         try {
-            sm = mppsmb1.createSubsetSampleModel(bands);
+            mppsmb1.createSubsetSampleModel(bands);
         } catch (RasterFormatException e) {
             fail();
         }
 
         try {
-            sm = mppsmb1.createSubsetSampleModel(wrongBands);
+            mppsmb1.createSubsetSampleModel(wrongBands);
         } catch (RasterFormatException e) {
             assertTrue(true);
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/SinglePixelPackedSampleModelTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/SinglePixelPackedSampleModelTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/SinglePixelPackedSampleModelTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/SinglePixelPackedSampleModelTest.java Wed Oct 18 22:18:19 2006
@@ -65,6 +65,7 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         dbb1 = new DataBufferByte(w * h);
@@ -1849,9 +1850,9 @@
     private int[] createPixelsFromByteDataElements(byte byteData[]){
         int pixel[] = new int[bitMaskB.length * byteData.length];
         int idx = 0;
-        for(int j = 0; j < byteData.length; j++){
+        for (byte element : byteData) {
             for(int i = 0; i < bitMaskB.length; i++){
-                pixel[idx++] = (byteData[j] & bitMaskB[i]) >>> bitOffsetsB[i];
+                pixel[idx++] = (element & bitMaskB[i]) >>> bitOffsetsB[i];
             }
         }
         return pixel;
@@ -1860,9 +1861,9 @@
     private int[] createPixelsFromShortDataElements(short shortData[]){
         int pixel[] = new int[bitMaskUS.length * shortData.length];
         int idx = 0;
-        for(int j = 0; j < shortData.length; j++){
+        for (short element : shortData) {
             for(int i = 0; i < bitMaskUS.length; i++){
-                pixel[idx++] = (shortData[j] & bitMaskUS[i]) >>> bitOffsetsUS[i];
+                pixel[idx++] = (element & bitMaskUS[i]) >>> bitOffsetsUS[i];
             }
         }
         return pixel;
@@ -1871,9 +1872,9 @@
     private int[] createPixelsFromIntDataElements(int intData[]){
         int pixel[] = new int[bitMaskI.length * intData.length];
         int idx = 0;
-        for(int j = 0; j < intData.length; j++){
+        for (int element : intData) {
             for(int i = 0; i < bitMaskI.length; i++){
-                pixel[idx++] = (intData[j] & bitMaskI[i]) >>> bitOffsetsI[i];
+                pixel[idx++] = (element & bitMaskI[i]) >>> bitOffsetsI[i];
             }
         }
         return pixel;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaLineCashTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaLineCashTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaLineCashTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaLineCashTest.java Wed Oct 18 22:18:19 2006
@@ -32,11 +32,13 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         area = new MultiRectArea.LineCash(CASH_SIZE);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         area = null;
         super.tearDown();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaRectCashTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaRectCashTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaRectCashTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaRectCashTest.java Wed Oct 18 22:18:19 2006
@@ -30,11 +30,13 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         area = new MultiRectArea.RectCash();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         area = null;
         super.tearDown();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaTest.java Wed Oct 18 22:18:19 2006
@@ -47,26 +47,29 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         area = new MultiRectArea();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         area = null;
         super.tearDown();
     }
 
     void fillRect(int[] buf, int width, Rectangle rect, int inc) {
-        for(int x = rect.x; x < rect.x + rect.width; x++)
+        for(int x = rect.x; x < rect.x + rect.width; x++) {
             for(int y = rect.y; y < rect.y + rect.height; y++) {
                 buf[x + y * width] += inc;
             }
+        }
     }
 
     void fillMultiRectArea(int[] buf, int width, MultiRectArea area, int inc) {
         Rectangle[] rect = area.getRectangles();
-        for(int i = 0; i < rect.length; i++) {
-            fillRect(buf, width, rect[i], inc);
+        for (Rectangle element : rect) {
+            fillRect(buf, width, element, inc);
         }
     }
 
@@ -74,14 +77,17 @@
 
         static class Intersect extends OperationTest {
 
+            @Override
             String getName() {
                 return "Intersect";
             }
 
+            @Override
             MultiRectArea getResult(MultiRectArea mra1, MultiRectArea mra2) {
                 return MultiRectArea.intersect(mra1, mra2);
             }
 
+            @Override
             boolean isValid(int[] buf, int index) {
                 return
                     buf[index] == 0 ||
@@ -94,14 +100,17 @@
 
         static class Union extends OperationTest {
 
+            @Override
             String getName() {
                 return "Union";
             }
 
+            @Override
             MultiRectArea getResult(MultiRectArea mra1, MultiRectArea mra2) {
                 return MultiRectArea.union(mra1, mra2);
             }
 
+            @Override
             boolean isValid(int[] buf, int index) {
                 return
                     buf[index] == 0 ||
@@ -114,14 +123,17 @@
 
         static class Subtract extends OperationTest {
 
+            @Override
             String getName() {
                 return "Subtract";
             }
 
+            @Override
             MultiRectArea getResult(MultiRectArea mra1, MultiRectArea mra2) {
                 return MultiRectArea.subtract(mra1, mra2);
             }
 
+            @Override
             boolean isValid(int[] buf, int index) {
                 return
                     buf[index] == 0 ||
@@ -164,7 +176,7 @@
         int errCount = 0;
 
     outer:
-        for(int j = 0; j < height; j += STEP)
+        for(int j = 0; j < height; j += STEP) {
             for(int i = 0; i < width; i += STEP) {
                 BufferedImage img = new BufferedImage(bufWidth, bufHeight, BufferedImage.TYPE_INT_RGB);
                 int[] buf = ((DataBufferInt)img.getRaster().getDataBuffer()).getData();
@@ -202,6 +214,7 @@
                     area1.translate(-i, STEP);
                 }
             }
+        }
 
         if (errCount > 0) {
             fail(op.getName() + " failed");
@@ -293,8 +306,8 @@
         return r;
     }
 
-    ArrayList createList(int[][] rect) {
-        ArrayList r = new ArrayList();
+    ArrayList<Rectangle> createList(int[][] rect) {
+        ArrayList<Rectangle> r = new ArrayList<Rectangle>();
         for(int i = 0; i < rect.length; i++) {
             r.add(i, new Rectangle(
                     rect[i][0],

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaTestCase.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaTestCase.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaTestCase.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/gl/MultiRectAreaTestCase.java Wed Oct 18 22:18:19 2006
@@ -59,7 +59,7 @@
         return Tools.MultiRectArea.color[index % Tools.MultiRectArea.color.length];
     }
 
-    String concat(String msg1, String msg2) {
+    private String concat(String msg1, String msg2) {
         if (msg1 == null) {
             return msg2;
         }
@@ -103,7 +103,7 @@
         for(int i = 0; i < rect.length; i++) {
 
             // Fill rect
-            for(int x = rect[i].x; x < rect[i].x + rect[i].width; x++)
+            for(int x = rect[i].x; x < rect[i].x + rect[i].width; x++) {
                 for(int y = rect[i].y; y < rect[i].y + rect[i].height; y++) {
                     if (img.getRGB(x, y) == colorBack.getRGB()) {
                         img.setRGB(x, y, getRectColor(i).getRGB());
@@ -112,6 +112,7 @@
                         img.setRGB(x, y, colorOverride.getRGB());
                     }
                 }
+            }
         }
 
         if (areaName != null) {



Mime
View raw message