8054828: TEST_BUG: Typos in java/lang/Long/ParsingTest
authoralanb
Tue, 12 Aug 2014 14:57:36 +0100
changeset 25981 ae524ae51679
parent 25980 76e7de7a6ef7
child 25982 724303cf59ba
8054828: TEST_BUG: Typos in java/lang/Long/ParsingTest Reviewed-by: alanb Contributed-by: claes.redestad@oracle.com
jdk/test/java/lang/Long/ParsingTest.java
--- a/jdk/test/java/lang/Long/ParsingTest.java	Tue Aug 12 00:13:57 2014 +0400
+++ b/jdk/test/java/lang/Long/ParsingTest.java	Tue Aug 12 14:57:36 2014 +0100
@@ -128,10 +128,10 @@
     }
 
     private static void checkNumberFormatException(String val, int radix, int start) {
-        int n = 0;
+        long n = 0;
         try {
-            n = Integer.parseInt(val, radix, start);
-            System.err.println("parseInt(" + val + ", " + radix + ", " + start +
+            n = Long.parseLong(val, radix, start);
+            System.err.println("parseLong(" + val + ", " + radix + ", " + start +
                     ") incorrectly returned " + n);
             throw new RuntimeException();
         } catch (NumberFormatException nfe) {
@@ -143,7 +143,7 @@
         long n = 0;
         try {
             n = Long.parseLong(val, radix, start, end);
-            System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end +
+            System.err.println("parseLong(" + val + ", " + radix + ", " + start + ", " + end +
                     ") incorrectly returned " + n);
             throw new RuntimeException();
         } catch (NumberFormatException nfe) {
@@ -152,10 +152,10 @@
     }
 
     private static void checkIndexOutOfBoundsException(String val, int radix, int start) {
-        int n = 0;
+        long n = 0;
         try {
-            n = Integer.parseInt(val, radix, start);
-            System.err.println("parseInt(" + val + ", " + radix + ", " + start +
+            n = Long.parseLong(val, radix, start);
+            System.err.println("parseLong(" + val + ", " + radix + ", " + start +
                     ") incorrectly returned " + n);
             throw new RuntimeException();
         } catch (IndexOutOfBoundsException ioob) {
@@ -167,7 +167,7 @@
         long n = 0;
         try {
             n = Long.parseLong(val, radix, start, end);
-            System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end +
+            System.err.println("parseLong(" + val + ", " + radix + ", " + start + ", " + end +
                     ") incorrectly returned " + n);
             throw new RuntimeException();
         } catch (IndexOutOfBoundsException ioob) {
@@ -179,7 +179,7 @@
         long n = 0;
         try {
             n = Long.parseLong(null, 10, start, end);
-            System.err.println("parseInt(null, " + radix + ", " + start + ", " + end +
+            System.err.println("parseLong(null, " + radix + ", " + start + ", " + end +
                     ") incorrectly returned " + n);
             throw new RuntimeException();
         } catch (NullPointerException npe) {