Index: tests/lib/math/math_test.dart |
diff --git a/tests/lib/math/math_test.dart b/tests/lib/math/math_test.dart |
index 9804138e00c5f9e1e97220ee893e37a5c71922d9..cfd2af65c00b8c9c3bc2065b06f928a6d9ec4898 100644 |
--- a/tests/lib/math/math_test.dart |
+++ b/tests/lib/math/math_test.dart |
@@ -153,7 +153,7 @@ class MathTest { |
static bool parseIntThrowsFormatException(str) { |
try { |
- parseInt(str); |
+ int.parse(str); |
return false; |
} on FormatException catch (e) { |
return true; |
@@ -161,50 +161,50 @@ class MathTest { |
} |
static void testParseInt() { |
- Expect.equals(499, parseInt("499")); |
- Expect.equals(499, parseInt("+499")); |
- Expect.equals(-499, parseInt("-499")); |
- Expect.equals(499, parseInt(" 499 ")); |
- Expect.equals(499, parseInt(" +499 ")); |
- Expect.equals(-499, parseInt(" -499 ")); |
- Expect.equals(0, parseInt("0")); |
- Expect.equals(0, parseInt("+0")); |
- Expect.equals(0, parseInt("-0")); |
- Expect.equals(0, parseInt(" 0 ")); |
- Expect.equals(0, parseInt(" +0 ")); |
- Expect.equals(0, parseInt(" -0 ")); |
- Expect.equals(0x1234567890, parseInt("0x1234567890")); |
- Expect.equals(-0x1234567890, parseInt("-0x1234567890")); |
- Expect.equals(0x1234567890, parseInt(" 0x1234567890 ")); |
- Expect.equals(-0x1234567890, parseInt(" -0x1234567890 ")); |
- Expect.equals(256, parseInt("0x100")); |
- Expect.equals(-256, parseInt("-0x100")); |
- Expect.equals(256, parseInt(" 0x100 ")); |
- Expect.equals(-256, parseInt(" -0x100 ")); |
- Expect.equals(0xabcdef, parseInt("0xabcdef")); |
- Expect.equals(0xABCDEF, parseInt("0xABCDEF")); |
- Expect.equals(0xabcdef, parseInt("0xabCDEf")); |
- Expect.equals(-0xabcdef, parseInt("-0xabcdef")); |
- Expect.equals(-0xABCDEF, parseInt("-0xABCDEF")); |
- Expect.equals(0xabcdef, parseInt(" 0xabcdef ")); |
- Expect.equals(0xABCDEF, parseInt(" 0xABCDEF ")); |
- Expect.equals(-0xabcdef, parseInt(" -0xabcdef ")); |
- Expect.equals(-0xABCDEF, parseInt(" -0xABCDEF ")); |
- Expect.equals(0xabcdef, parseInt("0x00000abcdef")); |
- Expect.equals(0xABCDEF, parseInt("0x00000ABCDEF")); |
- Expect.equals(-0xabcdef, parseInt("-0x00000abcdef")); |
- Expect.equals(-0xABCDEF, parseInt("-0x00000ABCDEF")); |
- Expect.equals(0xabcdef, parseInt(" 0x00000abcdef ")); |
- Expect.equals(0xABCDEF, parseInt(" 0x00000ABCDEF ")); |
- Expect.equals(-0xabcdef, parseInt(" -0x00000abcdef ")); |
- Expect.equals(-0xABCDEF, parseInt(" -0x00000ABCDEF ")); |
- Expect.equals(10, parseInt("010")); |
- Expect.equals(-10, parseInt("-010")); |
- Expect.equals(10, parseInt(" 010 ")); |
- Expect.equals(-10, parseInt(" -010 ")); |
- Expect.equals(9, parseInt("09")); |
- Expect.equals(9, parseInt(" 09 ")); |
- Expect.equals(-9, parseInt("-09")); |
+ Expect.equals(499, int.parse("499")); |
+ Expect.equals(499, int.parse("+499")); |
+ Expect.equals(-499, int.parse("-499")); |
+ Expect.equals(499, int.parse(" 499 ")); |
+ Expect.equals(499, int.parse(" +499 ")); |
+ Expect.equals(-499, int.parse(" -499 ")); |
+ Expect.equals(0, int.parse("0")); |
+ Expect.equals(0, int.parse("+0")); |
+ Expect.equals(0, int.parse("-0")); |
+ Expect.equals(0, int.parse(" 0 ")); |
+ Expect.equals(0, int.parse(" +0 ")); |
+ Expect.equals(0, int.parse(" -0 ")); |
+ Expect.equals(0x1234567890, int.parse("0x1234567890")); |
+ Expect.equals(-0x1234567890, int.parse("-0x1234567890")); |
+ Expect.equals(0x1234567890, int.parse(" 0x1234567890 ")); |
+ Expect.equals(-0x1234567890, int.parse(" -0x1234567890 ")); |
+ Expect.equals(256, int.parse("0x100")); |
+ Expect.equals(-256, int.parse("-0x100")); |
+ Expect.equals(256, int.parse(" 0x100 ")); |
+ Expect.equals(-256, int.parse(" -0x100 ")); |
+ Expect.equals(0xabcdef, int.parse("0xabcdef")); |
+ Expect.equals(0xABCDEF, int.parse("0xABCDEF")); |
+ Expect.equals(0xabcdef, int.parse("0xabCDEf")); |
+ Expect.equals(-0xabcdef, int.parse("-0xabcdef")); |
+ Expect.equals(-0xABCDEF, int.parse("-0xABCDEF")); |
+ Expect.equals(0xabcdef, int.parse(" 0xabcdef ")); |
+ Expect.equals(0xABCDEF, int.parse(" 0xABCDEF ")); |
+ Expect.equals(-0xabcdef, int.parse(" -0xabcdef ")); |
+ Expect.equals(-0xABCDEF, int.parse(" -0xABCDEF ")); |
+ Expect.equals(0xabcdef, int.parse("0x00000abcdef")); |
+ Expect.equals(0xABCDEF, int.parse("0x00000ABCDEF")); |
+ Expect.equals(-0xabcdef, int.parse("-0x00000abcdef")); |
+ Expect.equals(-0xABCDEF, int.parse("-0x00000ABCDEF")); |
+ Expect.equals(0xabcdef, int.parse(" 0x00000abcdef ")); |
+ Expect.equals(0xABCDEF, int.parse(" 0x00000ABCDEF ")); |
+ Expect.equals(-0xabcdef, int.parse(" -0x00000abcdef ")); |
+ Expect.equals(-0xABCDEF, int.parse(" -0x00000ABCDEF ")); |
+ Expect.equals(10, int.parse("010")); |
+ Expect.equals(-10, int.parse("-010")); |
+ Expect.equals(10, int.parse(" 010 ")); |
+ Expect.equals(-10, int.parse(" -010 ")); |
+ Expect.equals(9, int.parse("09")); |
+ Expect.equals(9, int.parse(" 09 ")); |
+ Expect.equals(-9, int.parse("-09")); |
Expect.equals(true, parseIntThrowsFormatException("1b")); |
Expect.equals(true, parseIntThrowsFormatException(" 1b ")); |
Expect.equals(true, parseIntThrowsFormatException(" 1 b ")); |