harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r465495 [3/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/geom/QuadCurve2DFloatTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/QuadCurve2DFloatTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/QuadCurve2DFloatTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/QuadCurve2DFloatTest.java Wed Oct 18 22:18:19 2006
@@ -28,11 +28,13 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         q = new QuadCurve2D.Float(1, 2, 3, 4, 5, 6);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         q = null;
         super.tearDown();
@@ -89,16 +91,16 @@
     }
 
     public void testGetBounds2D() {
-        for(int i = 0; i < QuadCurve2DTest.bounds.length; i++) {
+        for (double[][] element : QuadCurve2DTest.bounds) {
             QuadCurve2D curve = new QuadCurve2D.Float();
-            curve.setCurve(QuadCurve2DTest.bounds[i][0], 0);
+            curve.setCurve(element[0], 0);
             assertEquals(
                     quadToStr(curve),
                     new Rectangle2D.Float(
-                            (int)QuadCurve2DTest.bounds[i][1][0],
-                            (int)QuadCurve2DTest.bounds[i][1][1],
-                            (int)QuadCurve2DTest.bounds[i][1][2],
-                            (int)QuadCurve2DTest.bounds[i][1][3]),
+                            (int)element[1][0],
+                            (int)element[1][1],
+                            (int)element[1][2],
+                            (int)element[1][3]),
                     curve.getBounds2D());
         }
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/QuadCurve2DTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/QuadCurve2DTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/QuadCurve2DTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/QuadCurve2DTest.java Wed Oct 18 22:18:19 2006
@@ -73,11 +73,13 @@
 //      filterShape = createFilter("^(quad).*([.]shape)$", null);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         q = new QuadCurve2D.Double(1, 2, 3, 4, 5, 6);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         q = null;
         super.tearDown();
@@ -115,90 +117,90 @@
     }
 
     public void testGetFlatnessSq1() {
-        for(int i = 0; i < curves3.length; i++) {
+        for (double[] element : curves3) {
             QuadCurve2D curve = new QuadCurve2D.Double();
-            curve.setCurve(curves3[i], 0);
-            assertEquals(quadToStr(curve), curves3[i][6], curve.getFlatnessSq(), 0.0);
+            curve.setCurve(element, 0);
+            assertEquals(quadToStr(curve), element[6], curve.getFlatnessSq(), 0.0);
         }
     }
 
     public void testGetFlatnessSq2() {
-        for(int i = 0; i < curves3.length; i++) {
+        for (double[] element : curves3) {
             QuadCurve2D curve = new QuadCurve2D.Double();
-            curve.setCurve(curves3[i], 0);
+            curve.setCurve(element, 0);
             assertEquals(
                     quadToStr(curve),
-                    curves3[i][6],
+                    element[6],
                     QuadCurve2D.getFlatnessSq(
-                            curves3[i][0],
-                            curves3[i][1],
-                            curves3[i][2],
-                            curves3[i][3],
-                            curves3[i][4],
-                            curves3[i][5]), 0.0);
+                            element[0],
+                            element[1],
+                            element[2],
+                            element[3],
+                            element[4],
+                            element[5]), 0.0);
         }
     }
 
     public void testGetFlatnessSq3() {
-        for(int i = 0; i < curves3.length; i++) {
+        for (double[] element : curves3) {
             QuadCurve2D curve = new QuadCurve2D.Double();
-            curve.setCurve(curves3[i], 0);
+            curve.setCurve(element, 0);
             assertEquals(
                     quadToStr(curve),
-                    curves3[i][6],
-                    QuadCurve2D.getFlatnessSq(curves3[i], 0), 0.0);
+                    element[6],
+                    QuadCurve2D.getFlatnessSq(element, 0), 0.0);
         }
     }
 
     public void testGetFlatness1() {
-        for(int i = 0; i < curves3.length; i++) {
+        for (double[] element : curves3) {
             QuadCurve2D curve = new QuadCurve2D.Double();
-            curve.setCurve(curves3[i], 0);
-            assertEquals(quadToStr(curve), Math.sqrt(curves3[i][6]), curve.getFlatness(), 0.0);
+            curve.setCurve(element, 0);
+            assertEquals(quadToStr(curve), Math.sqrt(element[6]), curve.getFlatness(), 0.0);
         }
     }
 
     public void testGetFlatness2() {
-        for(int i = 0; i < curves3.length; i++) {
+        for (double[] element : curves3) {
             QuadCurve2D curve = new QuadCurve2D.Double();
-            curve.setCurve(curves3[i], 0);
+            curve.setCurve(element, 0);
             assertEquals(
                     quadToStr(curve),
-                    Math.sqrt(curves3[i][6]),
+                    Math.sqrt(element[6]),
                     QuadCurve2D.getFlatness(
-                            curves3[i][0],
-                            curves3[i][1],
-                            curves3[i][2],
-                            curves3[i][3],
-                            curves3[i][4],
-                            curves3[i][5]), 0.0);
+                            element[0],
+                            element[1],
+                            element[2],
+                            element[3],
+                            element[4],
+                            element[5]), 0.0);
         }
     }
 
     public void testGetFlatness3() {
-        for(int i = 0; i < curves3.length; i++) {
+        for (double[] element : curves3) {
             QuadCurve2D curve = new QuadCurve2D.Double();
-            curve.setCurve(curves3[i], 0);
+            curve.setCurve(element, 0);
             assertEquals(
                     quadToStr(curve),
-                    Math.sqrt(curves3[i][6]),
-                    QuadCurve2D.getFlatness(curves3[i], 0), 0.0);
+                    Math.sqrt(element[6]),
+                    QuadCurve2D.getFlatness(element, 0), 0.0);
         }
     }
 
     public void testSubdivide1() {
-        for(int i = 0; i < curves1.length; i ++) {
+        for (double[][] element : curves1) {
             QuadCurve2D src1 = new QuadCurve2D.Double();
             QuadCurve2D left1 = new QuadCurve2D.Double();
             QuadCurve2D right1 = new QuadCurve2D.Double();
-            src1.setCurve(curves1[i][0], 0);
-            left1.setCurve(curves1[i][1], 0);
-            right1.setCurve(curves1[i][2], 0);
+            src1.setCurve(element[0], 0);
+            left1.setCurve(element[1], 0);
+            right1.setCurve(element[2], 0);
 
             QuadCurve2D src2 = new QuadCurve2D.Double();
             QuadCurve2D left2 = new QuadCurve2D.Double();
             QuadCurve2D right2 = new QuadCurve2D.Double();
-            src2.setCurve(curves1[i][0], 0);
+            src2.setCurve(element[0], 0);
             QuadCurve2D.subdivide(src2, left2, right2);
 
             assertEquals(src1, src2, 0.0);
@@ -208,57 +210,57 @@
     }
 
     public void testSubdivide2() {
-        for(int i = 0; i < curves2.length; i ++) {
-            int srcOff = curves2[i][0][0] < 0.0 ? (int)-curves2[i][0][0] : 0;
-            int leftOff = curves2[i][1][0] < 0.0 ? (int)-curves2[i][1][0] : 0;
-            int rightOff = curves2[i][2][0] < 0.0 ? (int)-curves2[i][2][0] : 0;
+        for (double[][] element : curves2) {
+            int srcOff = element[0][0] < 0.0 ? (int)-element[0][0] : 0;
+            int leftOff = element[1][0] < 0.0 ? (int)-element[1][0] : 0;
+            int rightOff = element[2][0] < 0.0 ? (int)-element[2][0] : 0;
 
             double[] src = new double[10];
             double[] left = new double[10];
             double[] right = new double[10];
 
-            System.arraycopy(src, 0, curves2[i][0], 0, curves2[i][0].length);
-            System.arraycopy(left, 0, curves2[i][1], 0, curves2[i][1].length);
-            System.arraycopy(right, 0, curves2[i][2], 0, curves2[i][2].length);
+            System.arraycopy(src, 0, element[0], 0, element[0].length);
+            System.arraycopy(left, 0, element[1], 0, element[1].length);
+            System.arraycopy(right, 0, element[2], 0, element[2].length);
 
             QuadCurve2D.subdivide(src, srcOff, left, leftOff, right, rightOff);
 
-            assertEquals(curves2[i][0], src, curves2[i][0].length, 0.0);
-            assertEquals(curves2[i][1], left, curves2[i][1].length, 0.0);
-            assertEquals(curves2[i][2], right, curves2[i][2].length, 0.0);
+            assertEquals(element[0], src, element[0].length, 0.0);
+            assertEquals(element[1], left, element[1].length, 0.0);
+            assertEquals(element[2], right, element[2].length, 0.0);
         }
     }
 
     public void testSolveQuadratic1() {
-        for(int i = 0; i < equations.length; i++) {
+        for (double[][] element : equations) {
             double eqn[] = new double[3];
-            System.arraycopy(equations[i][0], 0, eqn, 0, 3);
+            System.arraycopy(element[0], 0, eqn, 0, 3);
             String seqn =
                 "[" + doubleToStr(eqn[0]) + "," +
                 doubleToStr(eqn[1]) + "," +
                 doubleToStr(eqn[2]) + "]";
             int roots = QuadCurve2D.solveQuadratic(eqn);
-            assertEquals(seqn + " roots count", (int)equations[i][1][0], roots);
+            assertEquals(seqn + " roots count", (int)element[1][0], roots);
             for(int j = 0; j < roots; j++) {
-                assertEquals(seqn + " root(" + j + ")", equations[i][1][1 + j], eqn[j], ROOT_DELTA);
+                assertEquals(seqn + " root(" + j + ")", element[1][1 + j], eqn[j], ROOT_DELTA);
             }
         }
     }
 
     public void testSolveQuadratic2() {
-        for(int i = 0; i < equations.length; i++) {
+        for (double[][] element : equations) {
             double res[] = new double[3];
             double eqn[] = new double[3];
-            System.arraycopy(equations[i][0], 0, eqn, 0, 3);
+            System.arraycopy(element[0], 0, eqn, 0, 3);
             String seqn =
                 "[" + doubleToStr(eqn[0]) + "," +
                 doubleToStr(eqn[1]) + "," +
                 doubleToStr(eqn[2]) + "]";
             int roots = QuadCurve2D.solveQuadratic(eqn, res);
-            assertEquals(seqn + " roots count", (int)equations[i][1][0], roots);
-            assertEquals(equations[i][0], eqn, 3, 0.0);
+            assertEquals(seqn + " roots count", (int)element[1][0], roots);
+            assertEquals(element[0], eqn, 3, 0.0);
             for(int j = 0; j < roots; j++) {
-                assertEquals(seqn + " root(" + j + ")", equations[i][1][1 + j], res[j], ROOT_DELTA);
+                assertEquals(seqn + " root(" + j + ")", element[1][1 + j], res[j], ROOT_DELTA);
             }
         }
     }
@@ -268,16 +270,16 @@
     }
 
     public void testGetBounds() {
-        for(int i = 0; i < bounds.length; i++) {
+        for (double[][] element : bounds) {
             QuadCurve2D curve = new QuadCurve2D.Double();
-            curve.setCurve(bounds[i][0], 0);
+            curve.setCurve(element[0], 0);
             assertEquals(
                     quadToStr(curve),
                     new Rectangle(
-                            (int)bounds[i][1][0],
-                            (int)bounds[i][1][1],
-                            (int)bounds[i][1][2],
-                            (int)bounds[i][1][3]),
+                            (int)element[1][0],
+                            (int)element[1][1],
+                            (int)element[1][2],
+                            (int)element[1][3]),
                     curve.getBounds());
         }
     }

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

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Rectangle2DTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Rectangle2DTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Rectangle2DTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/Rectangle2DTest.java Wed Oct 18 22:18:19 2006
@@ -118,11 +118,13 @@
 //      filterShape = createFilter("^(rect).*([.]shape)$", null);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         r = new Rectangle2D.Double(1, 2, 3, 4);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         r = null;
         super.tearDown();
@@ -166,28 +168,28 @@
 
     public void testIntersectsLine1() {
         Rectangle2D rr = new Rectangle2D.Double(1, 2, 3, 4);
-        for(int i = 0; i < lines.length; i++) {
-            int x1 = lines[i][0];
-            int y1 = lines[i][1];
-            int x2 = lines[i][2];
-            int y2 = lines[i][3];
+        for (int[] element : lines) {
+            int x1 = element[0];
+            int y1 = element[1];
+            int x2 = element[2];
+            int y2 = element[3];
             assertEquals(
                     "Rectangle2D.intersectsLine(" + x1 + "," + y1 + "," + x2 + "," + y2 + ") failed",
-                    lines[i][4] == 1,
+                    element[4] == 1,
                     rr.intersectsLine(x1, y1, x2, y2));
         }
     }
 
     public void testIntersectsLine2() {
         Rectangle2D rr = new Rectangle2D.Double(1, 2, 3, 4);
-        for(int i = 0; i < lines.length; i++) {
-            int x1 = lines[i][0];
-            int y1 = lines[i][1];
-            int x2 = lines[i][2];
-            int y2 = lines[i][3];
+        for (int[] element : lines) {
+            int x1 = element[0];
+            int y1 = element[1];
+            int x2 = element[2];
+            int y2 = element[3];
             assertEquals(
                     "Rectangle2D.intersectsLine(" + x1 + "," + y1 + "," + x2 + "," + y2 + ") failed",
-                    lines[i][4] == 1,
+                    element[4] == 1,
                     rr.intersectsLine(new Line2D.Double(x1, y1, x2, y2)));
         }
     }

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RoundRectangle2DDoubleTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RoundRectangle2DDoubleTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RoundRectangle2DDoubleTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RoundRectangle2DDoubleTest.java Wed Oct 18 22:18:19 2006
@@ -28,11 +28,13 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         r = new RoundRectangle2D.Double(1, 2, 3, 4, 5, 6);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RoundRectangle2DFloatTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RoundRectangle2DFloatTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RoundRectangle2DFloatTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/RoundRectangle2DFloatTest.java Wed Oct 18 22:18:19 2006
@@ -28,11 +28,13 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         r = new RoundRectangle2D.Float(1, 2, 3, 4, 5, 6);
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeProducer.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeProducer.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeProducer.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeProducer.java Wed Oct 18 22:18:19 2006
@@ -217,74 +217,74 @@
     }
 
     void createRect() {
-        for(int i = 0; i < rect.length; i++) {
+        for (double[][] element : rect) {
             saveRectShape(
                     path,
-                    createRect(rect[i][0]),
-                    createTransform(rect[i][1]),
-                    createFlatness(rect[i][2]));
+                    createRect(element[0]),
+                    createTransform(element[1]),
+                    createFlatness(element[2]));
         }
     }
 
     void createRound() {
-        for(int i = 0; i < round.length; i++) {
+        for (double[][] element : round) {
             saveRectShape(
                     path,
-                    createRound(round[i][0]),
-                    createTransform(round[i][1]),
-                    createFlatness(round[i][2]));
+                    createRound(element[0]),
+                    createTransform(element[1]),
+                    createFlatness(element[2]));
         }
     }
 
     void createEllipse() {
-        for(int i = 0; i < ellipse.length; i++) {
+        for (double[][] element : ellipse) {
             saveRectShape(
                     path,
-                    createEllipse(ellipse[i][0]),
-                    createTransform(ellipse[i][1]),
-                    createFlatness(ellipse[i][2]));
+                    createEllipse(element[0]),
+                    createTransform(element[1]),
+                    createFlatness(element[2]));
         }
     }
 
     void createArc() {
-        for(int i = 0; i < arc.length; i++) {
-            for(int j = 0; j < arc[i][3].length; j++) {
+        for (double[][] element : arc) {
+            for(int j = 0; j < element[3].length; j++) {
                 saveRectShape(
                         path,
-                        createArc(arc[i][0], (int)arc[i][3][j]),
-                        createTransform(arc[i][1]),
-                        createFlatness(arc[i][2]));
+                        createArc(element[0], (int)element[3][j]),
+                        createTransform(element[1]),
+                        createFlatness(element[2]));
             }
         }
     }
 
     void createQuad() {
-        for(int i = 0; i < quad.length; i++) {
+        for (double[][] element : quad) {
             saveRectShape(
                     path,
-                    createQuad(quad[i][0]),
-                    createTransform(quad[i][1]),
-                    createFlatness(quad[i][2]));
+                    createQuad(element[0]),
+                    createTransform(element[1]),
+                    createFlatness(element[2]));
         }
     }
 
     void createCubic() {
-        for(int i = 0; i < cubic.length; i++) {
+        for (double[][] element : cubic) {
             saveRectShape(
                     path,
-                    createCubic(cubic[i][0]),
-                    createTransform(cubic[i][1]),
-                    createFlatness(cubic[i][2]));
+                    createCubic(element[0]),
+                    createTransform(element[1]),
+                    createFlatness(element[2]));
         }
     }
 
     void createPolygon() {
-        for(int i = 0; i < polygon.length; i++) {
+        for (double[][] element : polygon) {
             saveRectShape(
                     path,
-                    createPolygon(polygon[i][0]),
-                    createTransform(polygon[i][1]),
-                    createFlatness(polygon[i][2]));
+                    createPolygon(element[0]),
+                    createTransform(element[1]),
+                    createFlatness(element[2]));
         }
     }
 
@@ -322,7 +322,7 @@
         g.setColor(colorFill);
         ((Graphics2D)g).fill(src);
 */
-        for(int x = 0; x < img.getWidth(); x++)
+        for(int x = 0; x < img.getWidth(); x++) {
             for(int y = 0; y < img.getHeight(); y++) {
                 if (x == 120 && y == 120) {
                     System.out.println("test");
@@ -331,6 +331,7 @@
                     img.setRGB(x, y, colorFill.getRGB());
                 }
             }
+        }
 
         // Draw shape
         Stroke oldStroke = ((Graphics2D)g).getStroke();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeTest.java Wed Oct 18 22:18:19 2006
@@ -135,10 +135,12 @@
         new File(outputPath).mkdirs();
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -240,7 +242,6 @@
             String fname = Tools.File.extractFileName(fileName);
             TextTokenizer t = new TextTokenizer(fname);
 
-            int type = 0;
             if (t.findString("rect(")) {
                 shape = new Rectangle2D.Double(
                         t.getDouble(),
@@ -350,10 +351,11 @@
 
     int[][] createImageBuffer(BufferedImage img) {
         int buf[][] = new int[img.getWidth()][img.getHeight()];
-        for(int x = 0; x < img.getWidth(); x++)
+        for(int x = 0; x < img.getWidth(); x++) {
             for(int y = 0; y < img.getHeight(); y++) {
                 buf[x][y] = img.getRGB(x, y);
             }
+        }
         return buf;
     }
 
@@ -387,7 +389,7 @@
             x2 = Math.max(r1[2], r2[2]);
             y2 = Math.max(r1[3], r2[3]);
         }
-        for(int x = x1; x <= x2; x++)
+        for(int x = x1; x <= x2; x++) {
             for(int y = y1; y <= y2; y++) {
                 boolean inside1 = r1 != null && r1[0] <= x && x <= r1[2] && r1[1] <= y && y <= r1[3];
                 boolean inside2 = r2 != null && r2[0] <= x && x <= r2[2] && r2[1] <= y && y <= r2[3];
@@ -411,6 +413,7 @@
                     }
                 }
             }
+        }
     }
 
     int getRectType(BufferedImage img, int buf[][], int rx, int ry, int rw, int rh, boolean usePrev) {
@@ -493,14 +496,14 @@
         int countErr = 0;
         try {
             Method method = this.getClass().getMethod(methodName, new Class[] {String.class, Object[].class});
-            for(int i = 0; i < tests.length; i++) {
-                Object res = method.invoke(this, new Object[] {tests[i], params});
+            for (String element : tests) {
+                Object res = method.invoke(this, new Object[] {element, params});
                 if (!((Boolean)res).booleanValue()) {
                     if (countErr == 0) {
                         System.out.println(name);
                     }
                     countErr++;
-                    System.out.println("Failed " + tests[i]);
+                    System.out.println("Failed " + element);
                 }
             }
         } catch(Exception e) {
@@ -526,7 +529,7 @@
             count = new int[]{0, 0, 0};
             prevRect = null;
 
-            for(int x = 0; x < img.getWidth() - RECT_WIDTH; x++)
+            for(int x = 0; x < img.getWidth() - RECT_WIDTH; x++) {
                 for(int y = 0; y < img.getHeight() - RECT_HEIGHT; y++) {
                     int rectType = getRectType(null, buf, x, y, RECT_WIDTH, RECT_HEIGHT, true);
                     if (rectType == 0) {
@@ -543,6 +546,7 @@
                         error = true;
                     }
                 }
+            }
 
             int errCount = 0;
             Random rnd = new Random();
@@ -592,6 +596,7 @@
             Shape shape = createShape(fileName);
             BufferedImage img = Tools.BufferedImage.loadIcon(fileName);
             int buf[][] = createImageBuffer(img);
+            assertNotNull(buf);
             Graphics g = img.getGraphics();
             g.setColor(errorColor);
 
@@ -627,7 +632,7 @@
         boolean error = false;
         Shape shape = createShape(fileName);
         BufferedImage img = Tools.BufferedImage.loadIcon(fileName);
-        for(int x = 0; x < img.getWidth(); x++)
+        for(int x = 0; x < img.getWidth(); x++) {
             for(int y = 0; y < img.getHeight(); y++) {
                 int color = getColor(img.getRGB(x, y));
                 boolean res = shape.contains(x, y);
@@ -638,6 +643,7 @@
                     error = true;
                 }
             }
+        }
         Tools.BufferedImage.saveIcon(img, outputPath + "cp_" + Tools.File.extractFileName(fileName));
         return !error;
     }
@@ -660,7 +666,6 @@
     }
 
     public boolean checkPathIterator(String fileName, Object[] params) {
-        boolean error = false;
         double flatness = getFlatness(fileName);
         AffineTransform at = createTransform(fileName);
         Shape shape1 = createShape(fileName);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeTestCase.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeTestCase.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeTestCase.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/geom/ShapeTestCase.java Wed Oct 18 22:18:19 2006
@@ -127,11 +127,13 @@
         }
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         countGoldenFiles = 0;
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -215,7 +217,6 @@
             String fname = Tools.File.extractFileName(fileName);
             TextTokenizer t = new TextTokenizer(fname);
 
-            int type = 0;
             if (t.findString("rect(")) {
                 shape = new Rectangle2D.Double(
                         t.getDouble(),
@@ -354,10 +355,11 @@
 
     int[][] createImageBuffer(BufferedImage img) {
         int buf[][] = new int[img.getWidth()][img.getHeight()];
-        for(int x = 0; x < img.getWidth(); x++)
+        for(int x = 0; x < img.getWidth(); x++) {
             for(int y = 0; y < img.getHeight(); y++) {
                 buf[x][y] = img.getRGB(x, y);
             }
+        }
         return buf;
     }
 
@@ -391,7 +393,7 @@
             x2 = Math.max(r1[2], r2[2]);
             y2 = Math.max(r1[3], r2[3]);
         }
-        for(int x = x1; x <= x2; x++)
+        for(int x = x1; x <= x2; x++) {
             for(int y = y1; y <= y2; y++) {
                 boolean inside1 = r1 != null && r1[0] <= x && x <= r1[2] && r1[1] <= y && y <= r1[3];
                 boolean inside2 = r2 != null && r2[0] <= x && x <= r2[2] && r2[1] <= y && y <= r2[3];
@@ -415,6 +417,7 @@
                     }
                 }
             }
+        }
     }
 
     int getRectType(BufferedImage img, int buf[][], int rx, int ry, int rw, int rh, boolean usePrev) {
@@ -497,16 +500,16 @@
         int countErr = 0;
         try {
             Method method = this.getClass().getMethod(methodName, new Class[] {String.class, Object[].class});
-            for(int i = 0; i < tests.length; i++) {
-                Object res = method.invoke(this, new Object[] {tests[i], params});
+            for (String element : tests) {
+                Object res = method.invoke(this, new Object[] {element, params});
                 if (!((Boolean)res).booleanValue()) {
                     if (countErr == 0) {
                         System.out.println(name);
                     }
                     countErr++;
-                    System.out.println("Failed " + tests[i]);
+                    System.out.println("Failed " + element);
                 } else {
-                    System.out.println(" " + tests[i]);
+                    System.out.println(" " + element);
                 }
             }
         } catch(Exception e) {
@@ -537,7 +540,7 @@
             count = new int[]{0, 0, 0};
             prevRect = null;
 
-            for(int x = 0; x < img.getWidth() - RECT_WIDTH; x++)
+            for(int x = 0; x < img.getWidth() - RECT_WIDTH; x++) {
                 for(int y = 0; y < img.getHeight() - RECT_HEIGHT; y++) {
                     int rectType = getRectType(null, buf, x, y, RECT_WIDTH, RECT_HEIGHT, true);
                     if (rectType == 0) {
@@ -554,6 +557,7 @@
                         error = true;
                     }
                 }
+            }
 
             int errCount = 0;
             Random rnd = new Random();
@@ -606,6 +610,7 @@
             Shape shape = createShape(fileName);
             BufferedImage img = Tools.BufferedImage.loadIcon(fileName);
             int buf[][] = createImageBuffer(img);
+            assertNotNull(buf);
             Graphics g = img.getGraphics();
             g.setColor(errorColor);
 
@@ -645,7 +650,7 @@
         boolean error = false;
         Shape shape = createShape(fileName);
         BufferedImage img = Tools.BufferedImage.loadIcon(fileName);
-        for(int x = 0; x < img.getWidth(); x++)
+        for(int x = 0; x < img.getWidth(); x++) {
             for(int y = 0; y < img.getHeight(); y++) {
                 int color = getColor(img.getRGB(x, y));
                 boolean res = shape.contains(x, y);
@@ -656,6 +661,7 @@
                     error = true;
                 }
             }
+        }
         if (OUTPUT) {
             Tools.BufferedImage.saveIcon(img, outputPath + "cp_" + Tools.File.extractFileName(fileName));
         }
@@ -683,7 +689,6 @@
 
     public boolean checkPathIterator(String fileName, Object[] params) {
         countGoldenFiles++;
-        boolean error = false;
         double flatness = getFlatness(fileName);
         AffineTransform at = createTransform(fileName);
         Shape shape1 = createShape(fileName);

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

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferByteTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferByteTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferByteTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferByteTest.java Wed Oct 18 22:18:19 2006
@@ -40,6 +40,7 @@
     /*
      * @see TestCase#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         byte dataArrays[][] = new byte[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] = (byte) 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] = (byte) 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] = (byte) 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] = (byte) 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] = (byte) 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] = (byte) 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] = (byte) 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] = (byte) 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] = (byte) 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] = (byte) 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] = (byte) 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] = (byte) 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/DataBufferDoubleTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferDoubleTest.java?view=diff&rev=465495&r1=465494&r2=465495
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferDoubleTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/DataBufferDoubleTest.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(DataBufferDoubleTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
         double dataArrays[][] = new double[numBanks][];
@@ -60,10 +54,6 @@
         db6 = new DataBufferDouble(size, numBanks);
     }
 
-    /**
-     * Constructor for DataBufferDoubleTest.
-     * @param name
-     */
     public DataBufferDoubleTest(String name) {
         super(name);
     }
@@ -239,7 +229,7 @@
         for(int i = 0; i < db1.getNumBanks(); i++){
             data = db1.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -252,7 +242,7 @@
         for(int i = 0; i < db2.getNumBanks(); i++){
             data = db2.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -265,7 +255,7 @@
         for(int i = 0; i < db3.getNumBanks(); i++){
             data = db3.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -278,7 +268,7 @@
         for(int i = 0; i < db4.getNumBanks(); i++){
             data = db4.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -291,7 +281,7 @@
         for(int i = 0; i < db5.getNumBanks(); i++){
             data = db5.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -304,7 +294,7 @@
         for(int i = 0; i < db6.getNumBanks(); i++){
             data = db6.getData(i);
             for(int j = 0; j < size; j++){
-                assertEquals((double)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -320,7 +310,7 @@
         data = db1.getData();
         offset = db1.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
@@ -329,7 +319,7 @@
         data = db2.getData();
         offset = db2.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
@@ -338,7 +328,7 @@
         data = db3.getData();
         offset = db3.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
@@ -347,7 +337,7 @@
         data = db4.getData();
         offset = db4.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
@@ -356,7 +346,7 @@
         data = db5.getData();
         offset = db5.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
 
         for(int i = 0; i < size; i++){
@@ -365,7 +355,7 @@
         data = db6.getData();
         offset = db6.getOffset();
         for(int i = 0; i < size; i++){
-            assertEquals((double)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
     }
 
@@ -377,7 +367,7 @@
         for(int i = 0; i < db1.getNumBanks(); i++){
             data = db1.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db1.getNumBanks(); i++){
@@ -390,7 +380,7 @@
         for(int i = 0; i < db2.getNumBanks(); i++){
             data = db2.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db2.getNumBanks(); i++){
@@ -403,7 +393,7 @@
         for(int i = 0; i < db3.getNumBanks(); i++){
             data = db3.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db3.getNumBanks(); i++){
@@ -416,7 +406,7 @@
         for(int i = 0; i < db4.getNumBanks(); i++){
             data = db4.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db4.getNumBanks(); i++){
@@ -429,7 +419,7 @@
         for(int i = 0; i < db5.getNumBanks(); i++){
             data = db5.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db5.getNumBanks(); i++){
@@ -442,7 +432,7 @@
         for(int i = 0; i < db6.getNumBanks(); i++){
             data = db6.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) j;
+                data[offsets[i] + j] = j;
             }
         }
         for(int i = 0; i < db6.getNumBanks(); i++){
@@ -459,7 +449,7 @@
         data = db1.getData();
         offset = db1.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (double) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db1.getElem(i));
@@ -468,7 +458,7 @@
         data = db2.getData();
         offset = db2.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (double) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db2.getElem(i));
@@ -477,7 +467,7 @@
         data = db3.getData();
         offset = db3.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (double) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db3.getElem(i));
@@ -486,7 +476,7 @@
         data = db4.getData();
         offset = db4.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (double) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db4.getElem(i));
@@ -495,7 +485,7 @@
         data = db5.getData();
         offset = db5.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (double) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db5.getElem(i));
@@ -504,7 +494,7 @@
         data = db6.getData();
         offset = db6.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (double) i;
+            data[offset + i] = i;
         }
         for(int i = 0; i < size; i++){
             assertEquals(i, db6.getElem(i));
@@ -517,79 +507,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((double)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((double)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((double)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((double)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((double)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((double)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -600,57 +590,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((double)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((double)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((double)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((double)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((double)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((double)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
     }
 
@@ -662,12 +652,12 @@
         for(int i = 0; i < db1.getNumBanks(); i++){
             data = db1.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +665,12 @@
         for(int i = 0; i < db2.getNumBanks(); i++){
             data = db2.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +678,12 @@
         for(int i = 0; i < db3.getNumBanks(); i++){
             data = db3.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +691,12 @@
         for(int i = 0; i < db4.getNumBanks(); i++){
             data = db4.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +704,12 @@
         for(int i = 0; i < db5.getNumBanks(); i++){
             data = db5.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +717,12 @@
         for(int i = 0; i < db6.getNumBanks(); i++){
             data = db6.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +734,55 @@
         data = db1.getData();
         offset = db1.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (double) 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] = (double) 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] = (double) 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] = (double) 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] = (double) 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] = (double) 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 +792,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((double)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((double)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((double)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((double)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((double)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((double)j, data[offsets[i] + j], 0);
+                assertEquals(j, data[offsets[i] + j], 0);
             }
         }
 
@@ -886,57 +876,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((double)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((double)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((double)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((double)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((double)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((double)i, data[offset + i], 0);
+            assertEquals(i, data[offset + i], 0);
         }
     }
 
@@ -948,12 +938,12 @@
         for(int i = 0; i < db1.getNumBanks(); i++){
             data = db1.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +951,12 @@
         for(int i = 0; i < db2.getNumBanks(); i++){
             data = db2.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +964,12 @@
         for(int i = 0; i < db3.getNumBanks(); i++){
             data = db3.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +977,12 @@
         for(int i = 0; i < db4.getNumBanks(); i++){
             data = db4.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +990,12 @@
         for(int i = 0; i < db5.getNumBanks(); i++){
             data = db5.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +1003,12 @@
         for(int i = 0; i < db6.getNumBanks(); i++){
             data = db6.getData(i);
             for(int j = 0; j < size; j++){
-                data[offsets[i] + j] = (double) 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 +1020,55 @@
         data = db1.getData();
         offset = db1.getOffset();
         for(int i = 0; i < size; i++){
-            data[offset + i] = (double) 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] = (double) 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] = (double) 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] = (double) 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] = (double) 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] = (double) 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);
         }
     }
 



Mime
View raw message