harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r556562 [2/6] - in /harmony/enhanced/classlib/trunk/modules/sql/src: main/java/java/sql/ main/java/javax/sql/ main/java/javax/sql/rowset/ main/java/javax/sql/rowset/serial/ main/java/javax/sql/rowset/spi/ main/java/javax/transaction/xa/ mai...
Date Mon, 16 Jul 2007 09:03:03 GMT
Modified: harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java?view=diff&rev=556562&r1=556561&r2=556562
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/BatchUpdateExceptionTest.java Mon Jul 16 02:02:56 2007
@@ -28,319 +28,319 @@
 
 public class BatchUpdateExceptionTest extends TestCase {
 
-	/*
-	 * ConstructorTest
-	 */
-	public void testBatchUpdateException() {
-
-		int[] theFinalStates1 = { 0 }; // Error Code state
-		int[][] theFinalStates2 = { null }; // Update Counts array state
-		String[] theFinalStates3 = { null }; // SQL State state value
-		String[] theFinalStates4 = { null }; // Message state
-
-		Exception[] theExceptions = { null };
-
-		BatchUpdateException aBatchUpdateException;
-		int loopCount = 1;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException();
-				if (theExceptions[i] != null) {
+    /*
+     * ConstructorTest
+     */
+    public void testBatchUpdateException() {
+
+        int[] theFinalStates1 = { 0 }; // Error Code state
+        int[][] theFinalStates2 = { null }; // Update Counts array state
+        String[] theFinalStates3 = { null }; // SQL State state value
+        String[] theFinalStates4 = { null }; // Message state
+
+        Exception[] theExceptions = { null };
+
+        BatchUpdateException aBatchUpdateException;
+        int loopCount = 1;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException();
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testBatchUpdateException
-
-	/*
-	 * ConstructorTest
-	 */
-	public void testBatchUpdateExceptionintArray() {
-
-		int[][] init1 = { { 1, 2, 3 }, null };
-
-		int[] theFinalStates1 = { 0, 0 }; // Error Code state
-		int[][] theFinalStates2 = init1; // Update Counts array state
-		String[] theFinalStates3 = { null, null }; // SQL State state value
-		String[] theFinalStates4 = { null, null }; // Message state
-
-		Exception[] theExceptions = { null, null };
-
-		BatchUpdateException aBatchUpdateException;
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException(init1[i]);
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testBatchUpdateException
+
+    /*
+     * ConstructorTest
+     */
+    public void testBatchUpdateExceptionintArray() {
+
+        int[][] init1 = { { 1, 2, 3 }, null };
+
+        int[] theFinalStates1 = { 0, 0 }; // Error Code state
+        int[][] theFinalStates2 = init1; // Update Counts array state
+        String[] theFinalStates3 = { null, null }; // SQL State state value
+        String[] theFinalStates4 = { null, null }; // Message state
+
+        Exception[] theExceptions = { null, null };
+
+        BatchUpdateException aBatchUpdateException;
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException(init1[i]);
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testBatchUpdateExceptionintArray
-
-	/*
-	 * ConstructorTest
-	 */
-	public void testBatchUpdateExceptionStringintArray() {
-
-		String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
-				".", "a" };
-		int[][] init2 = { { 1, 2, 3 }, {}, { 3 }, null, { 5, 5 }, { 6 },
-				{ 121, 2, 1 }, { 1 }, { 1, 2 } };
-
-		int[] theFinalStates1 = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // Error Code
-																// state
-		// Update Counts array state
-		int[][] theFinalStates2 = init2;
-		// SQL State state value
-		String[] theFinalStates3 = { null, null, null, null, null, null, null,
-				null, null };
-		String[] theFinalStates4 = init1; // Message state
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null,
-				null, null };
-
-		BatchUpdateException aBatchUpdateException;
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException(init1[i],
-						init2[i]);
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testBatchUpdateExceptionintArray
+
+    /*
+     * ConstructorTest
+     */
+    public void testBatchUpdateExceptionStringintArray() {
+
+        String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
+                ".", "a" };
+        int[][] init2 = { { 1, 2, 3 }, {}, { 3 }, null, { 5, 5 }, { 6 },
+                { 121, 2, 1 }, { 1 }, { 1, 2 } };
+
+        int[] theFinalStates1 = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // Error Code
+        // state
+        // Update Counts array state
+        int[][] theFinalStates2 = init2;
+        // SQL State state value
+        String[] theFinalStates3 = { null, null, null, null, null, null, null,
+                null, null };
+        String[] theFinalStates4 = init1; // Message state
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null,
+                null, null };
+
+        BatchUpdateException aBatchUpdateException;
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException(init1[i],
+                        init2[i]);
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testBatchUpdateExceptionStringintArray
-
-	/*
-	 * ConstructorTest
-	 */
-	public void testBatchUpdateExceptionStringStringintArray() {
-
-		String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
-				".", "a", "a" };
-		String[] init2 = { "a", "1", "valid1", "----", "&valid*", "a", null,
-				"", ".", "a" };
-		int[][] init3 = { { 1, 2, 3 }, {}, { 3 }, { 5, 5 }, { 6 },
-				{ 121, 2, 1 }, { 1 }, { 1, 2 }, { 1 }, { 2 }, null };
-
-		int[] theFinalStates1 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // Error
-																		// Code
-																		// state
-		// Update Counts array state
-		int[][] theFinalStates2 = init3;
-		// SQL State state value
-		String[] theFinalStates3 = init2;
-		String[] theFinalStates4 = init1; // Message state
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null,
-				null, null, null, null };
-
-		BatchUpdateException aBatchUpdateException;
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException(init1[i],
-						init2[i], init3[i]);
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testBatchUpdateExceptionStringintArray
+
+    /*
+     * ConstructorTest
+     */
+    public void testBatchUpdateExceptionStringStringintArray() {
+
+        String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
+                ".", "a", "a" };
+        String[] init2 = { "a", "1", "valid1", "----", "&valid*", "a", null,
+                "", ".", "a" };
+        int[][] init3 = { { 1, 2, 3 }, {}, { 3 }, { 5, 5 }, { 6 },
+                { 121, 2, 1 }, { 1 }, { 1, 2 }, { 1 }, { 2 }, null };
+
+        int[] theFinalStates1 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; // Error
+        // Code
+        // state
+        // Update Counts array state
+        int[][] theFinalStates2 = init3;
+        // SQL State state value
+        String[] theFinalStates3 = init2;
+        String[] theFinalStates4 = init1; // Message state
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null,
+                null, null, null, null };
+
+        BatchUpdateException aBatchUpdateException;
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException(init1[i],
+                        init2[i], init3[i]);
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testBatchUpdateExceptionStringStringintArray
-
-	/*
-	 * ConstructorTest
-	 */
-	public void testBatchUpdateExceptionStringStringintintArray() {
-
-		String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
-				".", "a", "a" };
-		String[] init2 = { "a", "1", "valid1", "----", "&valid*", "a", null,
-				"", ".", "a" };
-		int[] init3 = { -2147483648, 2147483647, 0, -492417162, -156220255,
-				-173012890, -631026360, -2147483648, -2147483648, -2147483648,
-				-2147483648 };
-		int[][] init4 = { { 1, 2, 3 }, {}, { 3 }, { 5, 5 }, { 6 },
-				{ 121, 2, 1 }, { 1 }, { 1, 2 }, { 1 }, { 2 }, null };
-
-		int[] theFinalStates1 = init3; // Error Code state
-		// Update Counts array state
-		int[][] theFinalStates2 = init4;
-		// SQL State state value
-		String[] theFinalStates3 = init2;
-		String[] theFinalStates4 = init1; // Message state
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null,
-				null, null, null, null };
-
-		BatchUpdateException aBatchUpdateException;
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException(init1[i],
-						init2[i], init3[i], init4[i]);
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testBatchUpdateExceptionStringStringintArray
+
+    /*
+     * ConstructorTest
+     */
+    public void testBatchUpdateExceptionStringStringintintArray() {
+
+        String[] init1 = { "a", "1", "valid1", "----", "&valid*", null, "",
+                ".", "a", "a" };
+        String[] init2 = { "a", "1", "valid1", "----", "&valid*", "a", null,
+                "", ".", "a" };
+        int[] init3 = { -2147483648, 2147483647, 0, -492417162, -156220255,
+                -173012890, -631026360, -2147483648, -2147483648, -2147483648,
+                -2147483648 };
+        int[][] init4 = { { 1, 2, 3 }, {}, { 3 }, { 5, 5 }, { 6 },
+                { 121, 2, 1 }, { 1 }, { 1, 2 }, { 1 }, { 2 }, null };
+
+        int[] theFinalStates1 = init3; // Error Code state
+        // Update Counts array state
+        int[][] theFinalStates2 = init4;
+        // SQL State state value
+        String[] theFinalStates3 = init2;
+        String[] theFinalStates4 = init1; // Message state
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null,
+                null, null, null, null };
+
+        BatchUpdateException aBatchUpdateException;
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException(init1[i],
+                        init2[i], init3[i], init4[i]);
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testBatchUpdateExceptionStringStringintintArray
-
-	/*
-	 * Method test for getUpdateCounts
-	 */
-	public void testGetUpdateCounts() {
-
-		BatchUpdateException aBatchUpdateException;
-		int[][] init1 = { { 1, 2, 3 }, {}, null };
-
-		int[] theReturn;
-		int[][] theReturns = init1;
-
-		int[] theFinalStates1 = { 0, 0, 0 }; // Error Code state
-		int[][] theFinalStates2 = init1; // Update Counts array state
-		String[] theFinalStates3 = { null, null, null }; // SQL State state
-															// value
-		String[] theFinalStates4 = { null, null, null }; // Message state
-
-		Exception[] theExceptions = { null, null, null };
-
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aBatchUpdateException = new BatchUpdateException(init1[i]);
-				theReturn = aBatchUpdateException.getUpdateCounts();
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testBatchUpdateExceptionStringStringintintArray
+
+    /*
+     * Method test for getUpdateCounts
+     */
+    public void testGetUpdateCounts() {
+
+        BatchUpdateException aBatchUpdateException;
+        int[][] init1 = { { 1, 2, 3 }, {}, null };
+
+        int[] theReturn;
+        int[][] theReturns = init1;
+
+        int[] theFinalStates1 = { 0, 0, 0 }; // Error Code state
+        int[][] theFinalStates2 = init1; // Update Counts array state
+        String[] theFinalStates3 = { null, null, null }; // SQL State state
+        // value
+        String[] theFinalStates4 = { null, null, null }; // Message state
+
+        Exception[] theExceptions = { null, null, null };
+
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aBatchUpdateException = new BatchUpdateException(init1[i]);
+                theReturn = aBatchUpdateException.getUpdateCounts();
+                if (theExceptions[i] != null) {
                     fail(i + "Exception missed");
                 }
-				assertEquals(i + "Return value mismatch", theReturn,
-						theReturns[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getErrorCode(),
-						theFinalStates1[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getUpdateCounts(),
-						theFinalStates2[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getSQLState(), theFinalStates3[i]);
-				assertEquals(i + " Final state mismatch: ",
-						aBatchUpdateException.getMessage(), theFinalStates4[i]);
+                assertEquals(i + "Return value mismatch", theReturn,
+                        theReturns[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getErrorCode(),
+                        theFinalStates1[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getUpdateCounts(),
+                        theFinalStates2[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getSQLState(), theFinalStates3[i]);
+                assertEquals(i + " Final state mismatch: ",
+                        aBatchUpdateException.getMessage(), theFinalStates4[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testGetUpdateCounts
 
-	} // end method testGetUpdateCounts
-    
     /**
      * @tests serialization/deserialization compatibility.
      */

Modified: harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ConnectionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ConnectionTest.java?view=diff&rev=556562&r1=556561&r2=556562
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ConnectionTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/ConnectionTest.java Mon Jul 16 02:02:56 2007
@@ -25,65 +25,65 @@
 
 public class ConnectionTest extends TestCase {
 
-	/*
-	 * Public statics test
-	 */
-	public void testPublicStatics() {
-
-		HashMap<String, Integer> thePublicStatics = new HashMap<String, Integer>();
-		thePublicStatics.put("TRANSACTION_SERIALIZABLE", new Integer(8));
-		thePublicStatics.put("TRANSACTION_REPEATABLE_READ", new Integer(4));
-		thePublicStatics.put("TRANSACTION_READ_COMMITTED", new Integer(2));
-		thePublicStatics.put("TRANSACTION_READ_UNCOMMITTED", new Integer(1));
-		thePublicStatics.put("TRANSACTION_NONE", new Integer(0));
-
-		/*
-		 * System.out.println( "TRANSACTION_SERIALIZABLE: " +
-		 * Connection.TRANSACTION_SERIALIZABLE ); System.out.println(
-		 * "TRANSACTION_REPEATABLE_READ: " +
-		 * Connection.TRANSACTION_REPEATABLE_READ ); System.out.println(
-		 * "TRANSACTION_READ_COMMITTED: " +
-		 * Connection.TRANSACTION_READ_COMMITTED ); System.out.println(
-		 * "TRANSACTION_READ_UNCOMMITTED: " +
-		 * Connection.TRANSACTION_READ_UNCOMMITTED ); System.out.println(
-		 * "TRANSACTION_NONE: " + Connection.TRANSACTION_NONE );
-		 */
-
-		Class<?> connectionClass;
-		try {
-			connectionClass = Class.forName("java.sql.Connection");
-		} catch (ClassNotFoundException e) {
-			fail("java.sql.Connection class not found!");
-			return;
-		} // end try
-
-		Field[] theFields = connectionClass.getDeclaredFields();
-		int requiredModifier = Modifier.PUBLIC + Modifier.STATIC
-				+ Modifier.FINAL;
-
-		int countPublicStatics = 0;
-		for (Field element : theFields) {
-			String fieldName = element.getName();
-			int theMods = element.getModifiers();
-			if (Modifier.isPublic(theMods) && Modifier.isStatic(theMods)) {
-				try {
-					Object fieldValue = element.get(null);
-					Object expectedValue = thePublicStatics.get(fieldName);
-					if (expectedValue == null) {
-						fail("Field " + fieldName + " missing!");
-					} // end
-					assertEquals("Field " + fieldName + " value mismatch: ",
-							expectedValue, fieldValue);
-					assertEquals("Field " + fieldName + " modifier mismatch: ",
-							requiredModifier, theMods);
-					countPublicStatics++;
-				} catch (IllegalAccessException e) {
-					fail("Illegal access to Field " + fieldName);
-				} // end try
-			} // end if
-		} // end for
+    /*
+     * Public statics test
+     */
+    public void testPublicStatics() {
+
+        HashMap<String, Integer> thePublicStatics = new HashMap<String, Integer>();
+        thePublicStatics.put("TRANSACTION_SERIALIZABLE", new Integer(8));
+        thePublicStatics.put("TRANSACTION_REPEATABLE_READ", new Integer(4));
+        thePublicStatics.put("TRANSACTION_READ_COMMITTED", new Integer(2));
+        thePublicStatics.put("TRANSACTION_READ_UNCOMMITTED", new Integer(1));
+        thePublicStatics.put("TRANSACTION_NONE", new Integer(0));
+
+        /*
+         * System.out.println( "TRANSACTION_SERIALIZABLE: " +
+         * Connection.TRANSACTION_SERIALIZABLE ); System.out.println(
+         * "TRANSACTION_REPEATABLE_READ: " +
+         * Connection.TRANSACTION_REPEATABLE_READ ); System.out.println(
+         * "TRANSACTION_READ_COMMITTED: " +
+         * Connection.TRANSACTION_READ_COMMITTED ); System.out.println(
+         * "TRANSACTION_READ_UNCOMMITTED: " +
+         * Connection.TRANSACTION_READ_UNCOMMITTED ); System.out.println(
+         * "TRANSACTION_NONE: " + Connection.TRANSACTION_NONE );
+         */
+
+        Class<?> connectionClass;
+        try {
+            connectionClass = Class.forName("java.sql.Connection");
+        } catch (ClassNotFoundException e) {
+            fail("java.sql.Connection class not found!");
+            return;
+        } // end try
+
+        Field[] theFields = connectionClass.getDeclaredFields();
+        int requiredModifier = Modifier.PUBLIC + Modifier.STATIC
+                + Modifier.FINAL;
+
+        int countPublicStatics = 0;
+        for (Field element : theFields) {
+            String fieldName = element.getName();
+            int theMods = element.getModifiers();
+            if (Modifier.isPublic(theMods) && Modifier.isStatic(theMods)) {
+                try {
+                    Object fieldValue = element.get(null);
+                    Object expectedValue = thePublicStatics.get(fieldName);
+                    if (expectedValue == null) {
+                        fail("Field " + fieldName + " missing!");
+                    } // end
+                    assertEquals("Field " + fieldName + " value mismatch: ",
+                            expectedValue, fieldValue);
+                    assertEquals("Field " + fieldName + " modifier mismatch: ",
+                            requiredModifier, theMods);
+                    countPublicStatics++;
+                } catch (IllegalAccessException e) {
+                    fail("Illegal access to Field " + fieldName);
+                } // end try
+            } // end if
+        } // end for
 
-	} // end method testPublicStatics
+    } // end method testPublicStatics
 
 } // end class ConnectionTest
 

Modified: harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DataTruncationTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DataTruncationTest.java?view=diff&rev=556562&r1=556561&r2=556562
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DataTruncationTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DataTruncationTest.java Mon Jul 16 02:02:56 2007
@@ -26,433 +26,433 @@
 
 public class DataTruncationTest extends TestCase {
 
-	/*
-	 * ConstructorTest
-	 */
-	public void testDataTruncationintbooleanbooleanintint() {
-
-		int[] init1 = { -2147483648, 2147483647, 0, 329751502, 318587557,
-				-1217247045, 329474146 };
-		boolean[] init2 = { false, true, false, false, false, true, false };
-		boolean[] init3 = { false, true, false, false, false, false, true };
-		int[] init4 = { -2147483648, 2147483647, 0, 1761409290, -1331044048,
-				-576231606, 661635011 };
-		int[] init5 = { -2147483648, 2147483647, 0, 540816689, -1890783845,
-				-105552912, -85923935 };
-
-		String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
-				"01004", "01004", "01004" };
-		String state2 = "Data truncation";
-		String[] theFinalStates2 = { state2, state2, state2, state2, state2,
-				state2, state2 };
-		int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
-		int[] theFinalStates4 = init1;
-		int[] theFinalStates5 = init4;
-		int[] theFinalStates6 = init5;
-		boolean[] theFinalStates7 = init2;
-		boolean[] theFinalStates8 = init3;
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null };
-
-		DataTruncation aDataTruncation;
-		int loopCount = init1.length;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aDataTruncation = new DataTruncation(init1[i], init2[i],
-						init3[i], init4[i], init5[i]);
-				if (theExceptions[i] != null) {
+    /*
+     * ConstructorTest
+     */
+    public void testDataTruncationintbooleanbooleanintint() {
+
+        int[] init1 = { -2147483648, 2147483647, 0, 329751502, 318587557,
+                -1217247045, 329474146 };
+        boolean[] init2 = { false, true, false, false, false, true, false };
+        boolean[] init3 = { false, true, false, false, false, false, true };
+        int[] init4 = { -2147483648, 2147483647, 0, 1761409290, -1331044048,
+                -576231606, 661635011 };
+        int[] init5 = { -2147483648, 2147483647, 0, 540816689, -1890783845,
+                -105552912, -85923935 };
+
+        String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
+                "01004", "01004", "01004" };
+        String state2 = "Data truncation";
+        String[] theFinalStates2 = { state2, state2, state2, state2, state2,
+                state2, state2 };
+        int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
+        int[] theFinalStates4 = init1;
+        int[] theFinalStates5 = init4;
+        int[] theFinalStates6 = init5;
+        boolean[] theFinalStates7 = init2;
+        boolean[] theFinalStates8 = init3;
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null };
+
+        DataTruncation aDataTruncation;
+        int loopCount = init1.length;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aDataTruncation = new DataTruncation(init1[i], init2[i],
+                        init3[i], init4[i], init5[i]);
+                if (theExceptions[i] != null) {
                     fail();
                 }
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getSQLState(), theFinalStates1[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getMessage(), theFinalStates2[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getErrorCode(), theFinalStates3[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getIndex(), theFinalStates4[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getDataSize(), theFinalStates5[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getTransferSize(), theFinalStates6[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getParameter(), theFinalStates7[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getRead(), theFinalStates8[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getSQLState(), theFinalStates1[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getMessage(), theFinalStates2[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getErrorCode(), theFinalStates3[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getIndex(), theFinalStates4[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getDataSize(), theFinalStates5[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getTransferSize(), theFinalStates6[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getParameter(), theFinalStates7[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getRead(), theFinalStates8[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testDataTruncationintbooleanbooleanintint
-
-	/*
-	 * Method test for getIndex
-	 */
-	public void testGetIndex() {
-
-		DataTruncation aDataTruncation;
-		int[] init1 = { -2147483648, 2147483647, 0, -2045829673, 1977156911,
-				478985827, 1687271915 };
-		boolean[] init2 = { false, true, false, false, true, true, true };
-		boolean[] init3 = { false, true, false, false, true, true, true };
-		int[] init4 = { -2147483648, 2147483647, 0, -631377748, 21025030,
-				1215194589, 1064137121 };
-		int[] init5 = { -2147483648, 2147483647, 0, -897998505, 997578180,
-				735015866, 264619424 };
-
-		int theReturn;
-		int[] theReturns = init1;
-		String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
-				"01004", "01004", "01004" };
-		String state2 = "Data truncation";
-		String[] theFinalStates2 = { state2, state2, state2, state2, state2,
-				state2, state2 };
-		int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
-		int[] theFinalStates4 = init1;
-		int[] theFinalStates5 = init4;
-		int[] theFinalStates6 = init5;
-		boolean[] theFinalStates7 = init2;
-		boolean[] theFinalStates8 = init3;
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null };
-
-		int loopCount = 1;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aDataTruncation = new DataTruncation(init1[i], init2[i],
-						init3[i], init4[i], init5[i]);
-				theReturn = aDataTruncation.getIndex();
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testDataTruncationintbooleanbooleanintint
+
+    /*
+     * Method test for getIndex
+     */
+    public void testGetIndex() {
+
+        DataTruncation aDataTruncation;
+        int[] init1 = { -2147483648, 2147483647, 0, -2045829673, 1977156911,
+                478985827, 1687271915 };
+        boolean[] init2 = { false, true, false, false, true, true, true };
+        boolean[] init3 = { false, true, false, false, true, true, true };
+        int[] init4 = { -2147483648, 2147483647, 0, -631377748, 21025030,
+                1215194589, 1064137121 };
+        int[] init5 = { -2147483648, 2147483647, 0, -897998505, 997578180,
+                735015866, 264619424 };
+
+        int theReturn;
+        int[] theReturns = init1;
+        String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
+                "01004", "01004", "01004" };
+        String state2 = "Data truncation";
+        String[] theFinalStates2 = { state2, state2, state2, state2, state2,
+                state2, state2 };
+        int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
+        int[] theFinalStates4 = init1;
+        int[] theFinalStates5 = init4;
+        int[] theFinalStates6 = init5;
+        boolean[] theFinalStates7 = init2;
+        boolean[] theFinalStates8 = init3;
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null };
+
+        int loopCount = 1;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aDataTruncation = new DataTruncation(init1[i], init2[i],
+                        init3[i], init4[i], init5[i]);
+                theReturn = aDataTruncation.getIndex();
+                if (theExceptions[i] != null) {
                     fail(i + "Exception missed");
                 }
-				assertEquals(i + "Return value mismatch", theReturn,
-						theReturns[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getSQLState(), theFinalStates1[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getMessage(), theFinalStates2[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getErrorCode(), theFinalStates3[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getIndex(), theFinalStates4[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getDataSize(), theFinalStates5[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getTransferSize(), theFinalStates6[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getParameter(), theFinalStates7[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getRead(), theFinalStates8[i]);
+                assertEquals(i + "Return value mismatch", theReturn,
+                        theReturns[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getSQLState(), theFinalStates1[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getMessage(), theFinalStates2[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getErrorCode(), theFinalStates3[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getIndex(), theFinalStates4[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getDataSize(), theFinalStates5[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getTransferSize(), theFinalStates6[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getParameter(), theFinalStates7[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getRead(), theFinalStates8[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testGetIndex
-
-	/*
-	 * Method test for getParameter
-	 */
-	public void testGetParameter() {
-
-		DataTruncation aDataTruncation;
-		int[] init1 = { -2147483648, 2147483647, 0, -492314242, 1637665948,
-				-305785075, 258819883 };
-		boolean[] init2 = { false, true, false, true, true, false, true };
-		boolean[] init3 = { false, true, false, false, false, true, true };
-		int[] init4 = { -2147483648, 2147483647, 0, 1134512579, 533874007,
-				1709608139, 990656593 };
-		int[] init5 = { -2147483648, 2147483647, 0, -1566784226, -744009101,
-				-444614454, 356465980 };
-
-		boolean theReturn;
-		boolean[] theReturns = init2;
-		String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
-				"01004", "01004", "01004" };
-		String state2 = "Data truncation";
-		String[] theFinalStates2 = { state2, state2, state2, state2, state2,
-				state2, state2 };
-		int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
-		int[] theFinalStates4 = init1;
-		int[] theFinalStates5 = init4;
-		int[] theFinalStates6 = init5;
-		boolean[] theFinalStates7 = init2;
-		boolean[] theFinalStates8 = init3;
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null };
-
-		int loopCount = 1;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aDataTruncation = new DataTruncation(init1[i], init2[i],
-						init3[i], init4[i], init5[i]);
-				theReturn = aDataTruncation.getParameter();
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testGetIndex
+
+    /*
+     * Method test for getParameter
+     */
+    public void testGetParameter() {
+
+        DataTruncation aDataTruncation;
+        int[] init1 = { -2147483648, 2147483647, 0, -492314242, 1637665948,
+                -305785075, 258819883 };
+        boolean[] init2 = { false, true, false, true, true, false, true };
+        boolean[] init3 = { false, true, false, false, false, true, true };
+        int[] init4 = { -2147483648, 2147483647, 0, 1134512579, 533874007,
+                1709608139, 990656593 };
+        int[] init5 = { -2147483648, 2147483647, 0, -1566784226, -744009101,
+                -444614454, 356465980 };
+
+        boolean theReturn;
+        boolean[] theReturns = init2;
+        String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
+                "01004", "01004", "01004" };
+        String state2 = "Data truncation";
+        String[] theFinalStates2 = { state2, state2, state2, state2, state2,
+                state2, state2 };
+        int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
+        int[] theFinalStates4 = init1;
+        int[] theFinalStates5 = init4;
+        int[] theFinalStates6 = init5;
+        boolean[] theFinalStates7 = init2;
+        boolean[] theFinalStates8 = init3;
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null };
+
+        int loopCount = 1;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aDataTruncation = new DataTruncation(init1[i], init2[i],
+                        init3[i], init4[i], init5[i]);
+                theReturn = aDataTruncation.getParameter();
+                if (theExceptions[i] != null) {
                     fail(i + "Exception missed");
                 }
-				assertEquals(i + "Return value mismatch", theReturn,
-						theReturns[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getSQLState(), theFinalStates1[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getMessage(), theFinalStates2[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getErrorCode(), theFinalStates3[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getIndex(), theFinalStates4[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getDataSize(), theFinalStates5[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getTransferSize(), theFinalStates6[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getParameter(), theFinalStates7[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getRead(), theFinalStates8[i]);
+                assertEquals(i + "Return value mismatch", theReturn,
+                        theReturns[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getSQLState(), theFinalStates1[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getMessage(), theFinalStates2[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getErrorCode(), theFinalStates3[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getIndex(), theFinalStates4[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getDataSize(), theFinalStates5[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getTransferSize(), theFinalStates6[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getParameter(), theFinalStates7[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getRead(), theFinalStates8[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testGetParameter
-
-	/*
-	 * Method test for getRead
-	 */
-	public void testGetRead() {
-
-		DataTruncation aDataTruncation;
-		int[] init1 = { -2147483648, 2147483647, 0, 2092420209, -1695764964,
-				1832837995, -80199594 };
-		boolean[] init2 = { false, true, false, false, false, true, true };
-		boolean[] init3 = { false, true, false, false, true, true, false };
-		int[] init4 = { -2147483648, 2147483647, 0, 1762375167, -604897453,
-				1362491587, 1007466498 };
-		int[] init5 = { -2147483648, 2147483647, 0, 1494407222, -1696982311,
-				-940493360, -1777579868 };
-
-		boolean theReturn;
-		boolean[] theReturns = init3;
-		String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
-				"01004", "01004", "01004" };
-		String state2 = "Data truncation";
-		String[] theFinalStates2 = { state2, state2, state2, state2, state2,
-				state2, state2 };
-		int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
-		int[] theFinalStates4 = init1;
-		int[] theFinalStates5 = init4;
-		int[] theFinalStates6 = init5;
-		boolean[] theFinalStates7 = init2;
-		boolean[] theFinalStates8 = init3;
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null };
-
-		int loopCount = 1;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aDataTruncation = new DataTruncation(init1[i], init2[i],
-						init3[i], init4[i], init5[i]);
-				theReturn = aDataTruncation.getRead();
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testGetParameter
+
+    /*
+     * Method test for getRead
+     */
+    public void testGetRead() {
+
+        DataTruncation aDataTruncation;
+        int[] init1 = { -2147483648, 2147483647, 0, 2092420209, -1695764964,
+                1832837995, -80199594 };
+        boolean[] init2 = { false, true, false, false, false, true, true };
+        boolean[] init3 = { false, true, false, false, true, true, false };
+        int[] init4 = { -2147483648, 2147483647, 0, 1762375167, -604897453,
+                1362491587, 1007466498 };
+        int[] init5 = { -2147483648, 2147483647, 0, 1494407222, -1696982311,
+                -940493360, -1777579868 };
+
+        boolean theReturn;
+        boolean[] theReturns = init3;
+        String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
+                "01004", "01004", "01004" };
+        String state2 = "Data truncation";
+        String[] theFinalStates2 = { state2, state2, state2, state2, state2,
+                state2, state2 };
+        int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
+        int[] theFinalStates4 = init1;
+        int[] theFinalStates5 = init4;
+        int[] theFinalStates6 = init5;
+        boolean[] theFinalStates7 = init2;
+        boolean[] theFinalStates8 = init3;
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null };
+
+        int loopCount = 1;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aDataTruncation = new DataTruncation(init1[i], init2[i],
+                        init3[i], init4[i], init5[i]);
+                theReturn = aDataTruncation.getRead();
+                if (theExceptions[i] != null) {
                     fail(i + "Exception missed");
                 }
-				assertEquals(i + "Return value mismatch", theReturn,
-						theReturns[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getSQLState(), theFinalStates1[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getMessage(), theFinalStates2[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getErrorCode(), theFinalStates3[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getIndex(), theFinalStates4[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getDataSize(), theFinalStates5[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getTransferSize(), theFinalStates6[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getParameter(), theFinalStates7[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getRead(), theFinalStates8[i]);
+                assertEquals(i + "Return value mismatch", theReturn,
+                        theReturns[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getSQLState(), theFinalStates1[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getMessage(), theFinalStates2[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getErrorCode(), theFinalStates3[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getIndex(), theFinalStates4[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getDataSize(), theFinalStates5[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getTransferSize(), theFinalStates6[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getParameter(), theFinalStates7[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getRead(), theFinalStates8[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testGetRead
-
-	/*
-	 * Method test for getDataSize
-	 */
-	public void testGetDataSize() {
-
-		DataTruncation aDataTruncation;
-		int[] init1 = { -2147483648, 2147483647, 0, 1146707040, -2020665632,
-				1268632617, -1595624039 };
-		boolean[] init2 = { false, true, false, true, false, true, true };
-		boolean[] init3 = { false, true, false, true, true, false, false };
-		int[] init4 = { -2147483648, 2147483647, 0, -367493363, 328996907,
-				-1581326731, 835022052 };
-		int[] init5 = { -2147483648, 2147483647, 0, -886134194, 908213800,
-				1123419516, -429606389 };
-
-		int theReturn;
-		int[] theReturns = init4;
-		String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
-				"01004", "01004", "01004" };
-		String state2 = "Data truncation";
-		String[] theFinalStates2 = { state2, state2, state2, state2, state2,
-				state2, state2 };
-		int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
-		int[] theFinalStates4 = init1;
-		int[] theFinalStates5 = init4;
-		int[] theFinalStates6 = init5;
-		boolean[] theFinalStates7 = init2;
-		boolean[] theFinalStates8 = init3;
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null };
-
-		int loopCount = 1;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aDataTruncation = new DataTruncation(init1[i], init2[i],
-						init3[i], init4[i], init5[i]);
-				theReturn = aDataTruncation.getDataSize();
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testGetRead
+
+    /*
+     * Method test for getDataSize
+     */
+    public void testGetDataSize() {
+
+        DataTruncation aDataTruncation;
+        int[] init1 = { -2147483648, 2147483647, 0, 1146707040, -2020665632,
+                1268632617, -1595624039 };
+        boolean[] init2 = { false, true, false, true, false, true, true };
+        boolean[] init3 = { false, true, false, true, true, false, false };
+        int[] init4 = { -2147483648, 2147483647, 0, -367493363, 328996907,
+                -1581326731, 835022052 };
+        int[] init5 = { -2147483648, 2147483647, 0, -886134194, 908213800,
+                1123419516, -429606389 };
+
+        int theReturn;
+        int[] theReturns = init4;
+        String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
+                "01004", "01004", "01004" };
+        String state2 = "Data truncation";
+        String[] theFinalStates2 = { state2, state2, state2, state2, state2,
+                state2, state2 };
+        int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
+        int[] theFinalStates4 = init1;
+        int[] theFinalStates5 = init4;
+        int[] theFinalStates6 = init5;
+        boolean[] theFinalStates7 = init2;
+        boolean[] theFinalStates8 = init3;
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null };
+
+        int loopCount = 1;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aDataTruncation = new DataTruncation(init1[i], init2[i],
+                        init3[i], init4[i], init5[i]);
+                theReturn = aDataTruncation.getDataSize();
+                if (theExceptions[i] != null) {
                     fail(i + "Exception missed");
                 }
-				assertEquals(i + "Return value mismatch", theReturn,
-						theReturns[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getSQLState(), theFinalStates1[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getMessage(), theFinalStates2[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getErrorCode(), theFinalStates3[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getIndex(), theFinalStates4[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getDataSize(), theFinalStates5[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getTransferSize(), theFinalStates6[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getParameter(), theFinalStates7[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getRead(), theFinalStates8[i]);
+                assertEquals(i + "Return value mismatch", theReturn,
+                        theReturns[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getSQLState(), theFinalStates1[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getMessage(), theFinalStates2[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getErrorCode(), theFinalStates3[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getIndex(), theFinalStates4[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getDataSize(), theFinalStates5[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getTransferSize(), theFinalStates6[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getParameter(), theFinalStates7[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getRead(), theFinalStates8[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
-
-	} // end method testGetDataSize
-
-	/*
-	 * Method test for getTransferSize
-	 */
-	public void testGetTransferSize() {
-
-		DataTruncation aDataTruncation;
-		int[] init1 = { -2147483648, 2147483647, 0, 78096124, 1719192600,
-				-1661234694, -1205825753 };
-		boolean[] init2 = { false, true, false, false, true, false, true };
-		boolean[] init3 = { false, true, false, false, false, false, false };
-		int[] init4 = { -2147483648, 2147483647, 0, -493779295, -2042560243,
-				-217347438, 1357818664 };
-		int[] init5 = { -2147483648, 2147483647, 0, -1647009002, -717544563,
-				-1368171905, -918209633 };
-
-		int theReturn;
-		int[] theReturns = init5;
-		String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
-				"01004", "01004", "01004" };
-		String state2 = "Data truncation";
-		String[] theFinalStates2 = { state2, state2, state2, state2, state2,
-				state2, state2 };
-		int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
-		int[] theFinalStates4 = init1;
-		int[] theFinalStates5 = init4;
-		int[] theFinalStates6 = init5;
-		boolean[] theFinalStates7 = init2;
-		boolean[] theFinalStates8 = init3;
-
-		Exception[] theExceptions = { null, null, null, null, null, null, null };
-
-		int loopCount = 1;
-		for (int i = 0; i < loopCount; i++) {
-			try {
-				aDataTruncation = new DataTruncation(init1[i], init2[i],
-						init3[i], init4[i], init5[i]);
-				theReturn = aDataTruncation.getTransferSize();
-				if (theExceptions[i] != null) {
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testGetDataSize
+
+    /*
+     * Method test for getTransferSize
+     */
+    public void testGetTransferSize() {
+
+        DataTruncation aDataTruncation;
+        int[] init1 = { -2147483648, 2147483647, 0, 78096124, 1719192600,
+                -1661234694, -1205825753 };
+        boolean[] init2 = { false, true, false, false, true, false, true };
+        boolean[] init3 = { false, true, false, false, false, false, false };
+        int[] init4 = { -2147483648, 2147483647, 0, -493779295, -2042560243,
+                -217347438, 1357818664 };
+        int[] init5 = { -2147483648, 2147483647, 0, -1647009002, -717544563,
+                -1368171905, -918209633 };
+
+        int theReturn;
+        int[] theReturns = init5;
+        String[] theFinalStates1 = { "01004", "01004", "01004", "01004",
+                "01004", "01004", "01004" };
+        String state2 = "Data truncation";
+        String[] theFinalStates2 = { state2, state2, state2, state2, state2,
+                state2, state2 };
+        int[] theFinalStates3 = { 0, 0, 0, 0, 0, 0, 0 };
+        int[] theFinalStates4 = init1;
+        int[] theFinalStates5 = init4;
+        int[] theFinalStates6 = init5;
+        boolean[] theFinalStates7 = init2;
+        boolean[] theFinalStates8 = init3;
+
+        Exception[] theExceptions = { null, null, null, null, null, null, null };
+
+        int loopCount = 1;
+        for (int i = 0; i < loopCount; i++) {
+            try {
+                aDataTruncation = new DataTruncation(init1[i], init2[i],
+                        init3[i], init4[i], init5[i]);
+                theReturn = aDataTruncation.getTransferSize();
+                if (theExceptions[i] != null) {
                     fail(i + "Exception missed");
                 }
-				assertEquals(i + "Return value mismatch", theReturn,
-						theReturns[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getSQLState(), theFinalStates1[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getMessage(), theFinalStates2[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getErrorCode(), theFinalStates3[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getIndex(), theFinalStates4[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getDataSize(), theFinalStates5[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getTransferSize(), theFinalStates6[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getParameter(), theFinalStates7[i]);
-				assertEquals(i + "  Final state mismatch", aDataTruncation
-						.getRead(), theFinalStates8[i]);
+                assertEquals(i + "Return value mismatch", theReturn,
+                        theReturns[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getSQLState(), theFinalStates1[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getMessage(), theFinalStates2[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getErrorCode(), theFinalStates3[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getIndex(), theFinalStates4[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getDataSize(), theFinalStates5[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getTransferSize(), theFinalStates6[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getParameter(), theFinalStates7[i]);
+                assertEquals(i + "  Final state mismatch", aDataTruncation
+                        .getRead(), theFinalStates8[i]);
 
-			} catch (Exception e) {
-				if (theExceptions[i] == null) {
+            } catch (Exception e) {
+                if (theExceptions[i] == null) {
                     fail(i + "Unexpected exception");
                 }
-				assertEquals(i + "Exception mismatch", e.getClass(),
-						theExceptions[i].getClass());
-				assertEquals(i + "Exception mismatch", e.getMessage(),
-						theExceptions[i].getMessage());
-			} // end try
-		} // end for
+                assertEquals(i + "Exception mismatch", e.getClass(),
+                        theExceptions[i].getClass());
+                assertEquals(i + "Exception mismatch", e.getMessage(),
+                        theExceptions[i].getMessage());
+            } // end try
+        } // end for
+
+    } // end method testGetTransferSize
 
-	} // end method testGetTransferSize
-    
     /**
      * @tests serialization/deserialization compatibility.
      */

Modified: harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DatabaseMetaDataTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DatabaseMetaDataTest.java?view=diff&rev=556562&r1=556561&r2=556562
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DatabaseMetaDataTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/sql/src/test/java/org/apache/harmony/sql/tests/java/sql/DatabaseMetaDataTest.java Mon Jul 16 02:02:56 2007
@@ -25,95 +25,95 @@
 
 public class DatabaseMetaDataTest extends TestCase {
 
-	/*
-	 * Public statics test
-	 */
-	public void testPublicStatics() {
+    /*
+     * Public statics test
+     */
+    public void testPublicStatics() {
 
-		HashMap<String, Number> thePublicStatics = new HashMap<String, Number>();
-		thePublicStatics.put("sqlStateSQL99", new Integer(2));
-		thePublicStatics.put("sqlStateXOpen", new Integer(1));
-		thePublicStatics.put("attributeNullableUnknown", new Short((short) 2));
-		thePublicStatics.put("attributeNullable", new Short((short) 1));
-		thePublicStatics.put("attributeNoNulls", new Short((short) 0));
-		thePublicStatics.put("tableIndexOther", new Short((short) 3));
-		thePublicStatics.put("tableIndexHashed", new Short((short) 2));
-		thePublicStatics.put("tableIndexClustered", new Short((short) 1));
-		thePublicStatics.put("tableIndexStatistic", new Short((short) 0));
-		thePublicStatics.put("typeSearchable", new Integer(3));
-		thePublicStatics.put("typePredBasic", new Integer(2));
-		thePublicStatics.put("typePredChar", new Integer(1));
-		thePublicStatics.put("typePredNone", new Integer(0));
-		thePublicStatics.put("typeNullableUnknown", new Integer(2));
-		thePublicStatics.put("typeNullable", new Integer(1));
-		thePublicStatics.put("typeNoNulls", new Integer(0));
-		thePublicStatics.put("importedKeyNotDeferrable", new Integer(7));
-		thePublicStatics.put("importedKeyInitiallyImmediate", new Integer(6));
-		thePublicStatics.put("importedKeyInitiallyDeferred", new Integer(5));
-		thePublicStatics.put("importedKeySetDefault", new Integer(4));
-		thePublicStatics.put("importedKeyNoAction", new Integer(3));
-		thePublicStatics.put("importedKeySetNull", new Integer(2));
-		thePublicStatics.put("importedKeyRestrict", new Integer(1));
-		thePublicStatics.put("importedKeyCascade", new Integer(0));
-		thePublicStatics.put("versionColumnPseudo", new Integer(2));
-		thePublicStatics.put("versionColumnNotPseudo", new Integer(1));
-		thePublicStatics.put("versionColumnUnknown", new Integer(0));
-		thePublicStatics.put("bestRowPseudo", new Integer(2));
-		thePublicStatics.put("bestRowNotPseudo", new Integer(1));
-		thePublicStatics.put("bestRowUnknown", new Integer(0));
-		thePublicStatics.put("bestRowSession", new Integer(2));
-		thePublicStatics.put("bestRowTransaction", new Integer(1));
-		thePublicStatics.put("bestRowTemporary", new Integer(0));
-		thePublicStatics.put("columnNullableUnknown", new Integer(2));
-		thePublicStatics.put("columnNullable", new Integer(1));
-		thePublicStatics.put("columnNoNulls", new Integer(0));
-		thePublicStatics.put("procedureNullableUnknown", new Integer(2));
-		thePublicStatics.put("procedureNullable", new Integer(1));
-		thePublicStatics.put("procedureNoNulls", new Integer(0));
-		thePublicStatics.put("procedureColumnResult", new Integer(3));
-		thePublicStatics.put("procedureColumnReturn", new Integer(5));
-		thePublicStatics.put("procedureColumnOut", new Integer(4));
-		thePublicStatics.put("procedureColumnInOut", new Integer(2));
-		thePublicStatics.put("procedureColumnIn", new Integer(1));
-		thePublicStatics.put("procedureColumnUnknown", new Integer(0));
-		thePublicStatics.put("procedureReturnsResult", new Integer(2));
-		thePublicStatics.put("procedureNoResult", new Integer(1));
-		thePublicStatics.put("procedureResultUnknown", new Integer(0));
+        HashMap<String, Number> thePublicStatics = new HashMap<String, Number>();
+        thePublicStatics.put("sqlStateSQL99", new Integer(2));
+        thePublicStatics.put("sqlStateXOpen", new Integer(1));
+        thePublicStatics.put("attributeNullableUnknown", new Short((short) 2));
+        thePublicStatics.put("attributeNullable", new Short((short) 1));
+        thePublicStatics.put("attributeNoNulls", new Short((short) 0));
+        thePublicStatics.put("tableIndexOther", new Short((short) 3));
+        thePublicStatics.put("tableIndexHashed", new Short((short) 2));
+        thePublicStatics.put("tableIndexClustered", new Short((short) 1));
+        thePublicStatics.put("tableIndexStatistic", new Short((short) 0));
+        thePublicStatics.put("typeSearchable", new Integer(3));
+        thePublicStatics.put("typePredBasic", new Integer(2));
+        thePublicStatics.put("typePredChar", new Integer(1));
+        thePublicStatics.put("typePredNone", new Integer(0));
+        thePublicStatics.put("typeNullableUnknown", new Integer(2));
+        thePublicStatics.put("typeNullable", new Integer(1));
+        thePublicStatics.put("typeNoNulls", new Integer(0));
+        thePublicStatics.put("importedKeyNotDeferrable", new Integer(7));
+        thePublicStatics.put("importedKeyInitiallyImmediate", new Integer(6));
+        thePublicStatics.put("importedKeyInitiallyDeferred", new Integer(5));
+        thePublicStatics.put("importedKeySetDefault", new Integer(4));
+        thePublicStatics.put("importedKeyNoAction", new Integer(3));
+        thePublicStatics.put("importedKeySetNull", new Integer(2));
+        thePublicStatics.put("importedKeyRestrict", new Integer(1));
+        thePublicStatics.put("importedKeyCascade", new Integer(0));
+        thePublicStatics.put("versionColumnPseudo", new Integer(2));
+        thePublicStatics.put("versionColumnNotPseudo", new Integer(1));
+        thePublicStatics.put("versionColumnUnknown", new Integer(0));
+        thePublicStatics.put("bestRowPseudo", new Integer(2));
+        thePublicStatics.put("bestRowNotPseudo", new Integer(1));
+        thePublicStatics.put("bestRowUnknown", new Integer(0));
+        thePublicStatics.put("bestRowSession", new Integer(2));
+        thePublicStatics.put("bestRowTransaction", new Integer(1));
+        thePublicStatics.put("bestRowTemporary", new Integer(0));
+        thePublicStatics.put("columnNullableUnknown", new Integer(2));
+        thePublicStatics.put("columnNullable", new Integer(1));
+        thePublicStatics.put("columnNoNulls", new Integer(0));
+        thePublicStatics.put("procedureNullableUnknown", new Integer(2));
+        thePublicStatics.put("procedureNullable", new Integer(1));
+        thePublicStatics.put("procedureNoNulls", new Integer(0));
+        thePublicStatics.put("procedureColumnResult", new Integer(3));
+        thePublicStatics.put("procedureColumnReturn", new Integer(5));
+        thePublicStatics.put("procedureColumnOut", new Integer(4));
+        thePublicStatics.put("procedureColumnInOut", new Integer(2));
+        thePublicStatics.put("procedureColumnIn", new Integer(1));
+        thePublicStatics.put("procedureColumnUnknown", new Integer(0));
+        thePublicStatics.put("procedureReturnsResult", new Integer(2));
+        thePublicStatics.put("procedureNoResult", new Integer(1));
+        thePublicStatics.put("procedureResultUnknown", new Integer(0));
 
-		Class<?> databaseMetaDataClass;
-		try {
-			databaseMetaDataClass = Class.forName("java.sql.DatabaseMetaData");
-		} catch (ClassNotFoundException e) {
-			fail("java.sql.DatabaseMetaData class not found!");
-			return;
-		} // end try
+        Class<?> databaseMetaDataClass;
+        try {
+            databaseMetaDataClass = Class.forName("java.sql.DatabaseMetaData");
+        } catch (ClassNotFoundException e) {
+            fail("java.sql.DatabaseMetaData class not found!");
+            return;
+        } // end try
 
-		Field[] theFields = databaseMetaDataClass.getDeclaredFields();
-		int requiredModifier = Modifier.PUBLIC + Modifier.STATIC
-				+ Modifier.FINAL;
+        Field[] theFields = databaseMetaDataClass.getDeclaredFields();
+        int requiredModifier = Modifier.PUBLIC + Modifier.STATIC
+                + Modifier.FINAL;
 
-		int countPublicStatics = 0;
-		for (Field element : theFields) {
-			String fieldName = element.getName();
-			int theMods = element.getModifiers();
-			if (Modifier.isPublic(theMods) && Modifier.isStatic(theMods)) {
-				try {
-					Object fieldValue = element.get(null);
-					Object expectedValue = thePublicStatics.get(fieldName);
-					if (expectedValue == null) {
-						fail("Field " + fieldName + " missing!");
-					} // end
-					assertEquals("Field " + fieldName + " value mismatch: ",
-							expectedValue, fieldValue);
-					assertEquals("Field " + fieldName + " modifier mismatch: ",
-							requiredModifier, theMods);
-					countPublicStatics++;
-				} catch (IllegalAccessException e) {
-					fail("Illegal access to Field " + fieldName);
-				} // end try
-			} // end if
-		} // end for
+        int countPublicStatics = 0;
+        for (Field element : theFields) {
+            String fieldName = element.getName();
+            int theMods = element.getModifiers();
+            if (Modifier.isPublic(theMods) && Modifier.isStatic(theMods)) {
+                try {
+                    Object fieldValue = element.get(null);
+                    Object expectedValue = thePublicStatics.get(fieldName);
+                    if (expectedValue == null) {
+                        fail("Field " + fieldName + " missing!");
+                    } // end
+                    assertEquals("Field " + fieldName + " value mismatch: ",
+                            expectedValue, fieldValue);
+                    assertEquals("Field " + fieldName + " modifier mismatch: ",
+                            requiredModifier, theMods);
+                    countPublicStatics++;
+                } catch (IllegalAccessException e) {
+                    fail("Illegal access to Field " + fieldName);
+                } // end try
+            } // end if
+        } // end for
 
-	} // end method testPublicStatics
+    } // end method testPublicStatics
 
 } // end class DatabaseMetaDataTest



Mime
View raw message