Index: tests/corelib/math_test.dart |
diff --git a/tests/corelib/math_test.dart b/tests/corelib/math_test.dart |
index 651587245a3c2570686c1dd16ef6bac012bb6e00..0c2e6a96df0bcae74c6d11f5b4aba6de83eec342 100644 |
--- a/tests/corelib/math_test.dart |
+++ b/tests/corelib/math_test.dart |
@@ -148,11 +148,11 @@ class MathTest { |
checkVeryClose(Math.SQRT1_2, Math.pow(0.5, 0.5)); |
} |
- static bool parseIntThrowsBadNumberFormatException(str) { |
+ static bool parseIntThrowsFormatException(str) { |
try { |
Math.parseInt(str); |
return false; |
- } catch (BadNumberFormatException e) { |
+ } catch (FormatException e) { |
return true; |
} |
} |
@@ -202,37 +202,37 @@ class MathTest { |
Expect.equals(9, Math.parseInt("09")); |
Expect.equals(9, Math.parseInt(" 09 ")); |
Expect.equals(-9, Math.parseInt("-09")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("1b")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" 1b ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" 1 b ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("1e2")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" 1e2 ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("00x12")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" 00x12 ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("-1b")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" -1b ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" -1 b ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("-1e2")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" -1e2 ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("-00x12")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" -00x12 ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" -00x12 ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("0x0x12")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("0.1")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("0x3.1")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("5.")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("+-5")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("-+5")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("--5")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("++5")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("+ 5")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("- 5")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("+0x1234567890")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" +0x1234567890 ")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException("+0x100")); |
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" +0x100 ")); |
+ Expect.equals(true, parseIntThrowsFormatException("1b")); |
+ Expect.equals(true, parseIntThrowsFormatException(" 1b ")); |
+ Expect.equals(true, parseIntThrowsFormatException(" 1 b ")); |
+ Expect.equals(true, parseIntThrowsFormatException("1e2")); |
+ Expect.equals(true, parseIntThrowsFormatException(" 1e2 ")); |
+ Expect.equals(true, parseIntThrowsFormatException("00x12")); |
+ Expect.equals(true, parseIntThrowsFormatException(" 00x12 ")); |
+ Expect.equals(true, parseIntThrowsFormatException("-1b")); |
+ Expect.equals(true, parseIntThrowsFormatException(" -1b ")); |
+ Expect.equals(true, parseIntThrowsFormatException(" -1 b ")); |
+ Expect.equals(true, parseIntThrowsFormatException("-1e2")); |
+ Expect.equals(true, parseIntThrowsFormatException(" -1e2 ")); |
+ Expect.equals(true, parseIntThrowsFormatException("-00x12")); |
+ Expect.equals(true, parseIntThrowsFormatException(" -00x12 ")); |
+ Expect.equals(true, parseIntThrowsFormatException(" -00x12 ")); |
+ Expect.equals(true, parseIntThrowsFormatException("0x0x12")); |
+ Expect.equals(true, parseIntThrowsFormatException("0.1")); |
+ Expect.equals(true, parseIntThrowsFormatException("0x3.1")); |
+ Expect.equals(true, parseIntThrowsFormatException("5.")); |
+ Expect.equals(true, parseIntThrowsFormatException("+-5")); |
+ Expect.equals(true, parseIntThrowsFormatException("-+5")); |
+ Expect.equals(true, parseIntThrowsFormatException("--5")); |
+ Expect.equals(true, parseIntThrowsFormatException("++5")); |
+ Expect.equals(true, parseIntThrowsFormatException("+ 5")); |
+ Expect.equals(true, parseIntThrowsFormatException("- 5")); |
+ Expect.equals(true, parseIntThrowsFormatException("")); |
+ Expect.equals(true, parseIntThrowsFormatException(" ")); |
+ Expect.equals(true, parseIntThrowsFormatException("+0x1234567890")); |
+ Expect.equals(true, parseIntThrowsFormatException(" +0x1234567890 ")); |
+ Expect.equals(true, parseIntThrowsFormatException("+0x100")); |
+ Expect.equals(true, parseIntThrowsFormatException(" +0x100 ")); |
} |
static testMain() { |