test/java/lang/Long/ParsingTest.java
Print this page
rev 10452 : 8054828: [TESTBUG] Typos in java/lang/Long/ParsingTest
*** 126,139 ****
; // Expected
}
}
private static void checkNumberFormatException(String val, int radix, int start) {
! int n = 0;
try {
! n = Integer.parseInt(val, radix, start);
! System.err.println("parseInt(" + val + ", " + radix + ", " + start +
") incorrectly returned " + n);
throw new RuntimeException();
} catch (NumberFormatException nfe) {
; // Expected
}
--- 126,139 ----
; // Expected
}
}
private static void checkNumberFormatException(String val, int radix, int start) {
! long n = 0;
try {
! n = Long.parseLong(val, radix, start);
! System.err.println("parseLong(" + val + ", " + radix + ", " + start +
") incorrectly returned " + n);
throw new RuntimeException();
} catch (NumberFormatException nfe) {
; // Expected
}
*** 141,163 ****
private static void checkNumberFormatException(String val, int radix, int start, int end) {
long n = 0;
try {
n = Long.parseLong(val, radix, start, end);
! System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end +
") incorrectly returned " + n);
throw new RuntimeException();
} catch (NumberFormatException nfe) {
; // Expected
}
}
private static void checkIndexOutOfBoundsException(String val, int radix, int start) {
! int n = 0;
try {
! n = Integer.parseInt(val, radix, start);
! System.err.println("parseInt(" + val + ", " + radix + ", " + start +
") incorrectly returned " + n);
throw new RuntimeException();
} catch (IndexOutOfBoundsException ioob) {
; // Expected
}
--- 141,163 ----
private static void checkNumberFormatException(String val, int radix, int start, int end) {
long n = 0;
try {
n = Long.parseLong(val, radix, start, end);
! System.err.println("parseLong(" + val + ", " + radix + ", " + start + ", " + end +
") incorrectly returned " + n);
throw new RuntimeException();
} catch (NumberFormatException nfe) {
; // Expected
}
}
private static void checkIndexOutOfBoundsException(String val, int radix, int start) {
! long n = 0;
try {
! n = Long.parseLong(val, radix, start);
! System.err.println("parseLong(" + val + ", " + radix + ", " + start +
") incorrectly returned " + n);
throw new RuntimeException();
} catch (IndexOutOfBoundsException ioob) {
; // Expected
}
*** 165,175 ****
private static void checkIndexOutOfBoundsException(String val, int radix, int start, int end) {
long n = 0;
try {
n = Long.parseLong(val, radix, start, end);
! System.err.println("parseInt(" + val + ", " + radix + ", " + start + ", " + end +
") incorrectly returned " + n);
throw new RuntimeException();
} catch (IndexOutOfBoundsException ioob) {
; // Expected
}
--- 165,175 ----
private static void checkIndexOutOfBoundsException(String val, int radix, int start, int end) {
long n = 0;
try {
n = Long.parseLong(val, radix, start, end);
! System.err.println("parseLong(" + val + ", " + radix + ", " + start + ", " + end +
") incorrectly returned " + n);
throw new RuntimeException();
} catch (IndexOutOfBoundsException ioob) {
; // Expected
}
*** 177,187 ****
private static void checkNull(int radix, int start, int end) {
long n = 0;
try {
n = Long.parseLong(null, 10, start, end);
! System.err.println("parseInt(null, " + radix + ", " + start + ", " + end +
") incorrectly returned " + n);
throw new RuntimeException();
} catch (NullPointerException npe) {
; // Expected
}
--- 177,187 ----
private static void checkNull(int radix, int start, int end) {
long n = 0;
try {
n = Long.parseLong(null, 10, start, end);
! System.err.println("parseLong(null, " + radix + ", " + start + ", " + end +
") incorrectly returned " + n);
throw new RuntimeException();
} catch (NullPointerException npe) {
; // Expected
}