Index: tests/lib/math/math2_test.dart |
diff --git a/tests/lib/math/math2_test.dart b/tests/lib/math/math2_test.dart |
index a2cc3a1ad4cf7403c521df818293dec75ea8a686..fb3c80489ec73fa4c441338ee7f28cd885af28fd 100644 |
--- a/tests/lib/math/math2_test.dart |
+++ b/tests/lib/math/math2_test.dart |
@@ -156,7 +156,7 @@ class MathLibraryTest { |
static bool parseIntThrowsFormatException(str) { |
try { |
- math.parseInt(str); |
+ int.parse(str); |
return false; |
} on FormatException catch (e) { |
return true; |
@@ -164,50 +164,50 @@ class MathLibraryTest { |
} |
static void testParseInt() { |
- Expect.equals(499, math.parseInt("499")); |
- Expect.equals(499, math.parseInt("+499")); |
- Expect.equals(-499, math.parseInt("-499")); |
- Expect.equals(499, math.parseInt(" 499 ")); |
- Expect.equals(499, math.parseInt(" +499 ")); |
- Expect.equals(-499, math.parseInt(" -499 ")); |
- Expect.equals(0, math.parseInt("0")); |
- Expect.equals(0, math.parseInt("+0")); |
- Expect.equals(0, math.parseInt("-0")); |
- Expect.equals(0, math.parseInt(" 0 ")); |
- Expect.equals(0, math.parseInt(" +0 ")); |
- Expect.equals(0, math.parseInt(" -0 ")); |
- Expect.equals(0x1234567890, math.parseInt("0x1234567890")); |
- Expect.equals(-0x1234567890, math.parseInt("-0x1234567890")); |
- Expect.equals(0x1234567890, math.parseInt(" 0x1234567890 ")); |
- Expect.equals(-0x1234567890, math.parseInt(" -0x1234567890 ")); |
- Expect.equals(256, math.parseInt("0x100")); |
- Expect.equals(-256, math.parseInt("-0x100")); |
- Expect.equals(256, math.parseInt(" 0x100 ")); |
- Expect.equals(-256, math.parseInt(" -0x100 ")); |
- Expect.equals(0xabcdef, math.parseInt("0xabcdef")); |
- Expect.equals(0xABCDEF, math.parseInt("0xABCDEF")); |
- Expect.equals(0xabcdef, math.parseInt("0xabCDEf")); |
- Expect.equals(-0xabcdef, math.parseInt("-0xabcdef")); |
- Expect.equals(-0xABCDEF, math.parseInt("-0xABCDEF")); |
- Expect.equals(0xabcdef, math.parseInt(" 0xabcdef ")); |
- Expect.equals(0xABCDEF, math.parseInt(" 0xABCDEF ")); |
- Expect.equals(-0xabcdef, math.parseInt(" -0xabcdef ")); |
- Expect.equals(-0xABCDEF, math.parseInt(" -0xABCDEF ")); |
- Expect.equals(0xabcdef, math.parseInt("0x00000abcdef")); |
- Expect.equals(0xABCDEF, math.parseInt("0x00000ABCDEF")); |
- Expect.equals(-0xabcdef, math.parseInt("-0x00000abcdef")); |
- Expect.equals(-0xABCDEF, math.parseInt("-0x00000ABCDEF")); |
- Expect.equals(0xabcdef, math.parseInt(" 0x00000abcdef ")); |
- Expect.equals(0xABCDEF, math.parseInt(" 0x00000ABCDEF ")); |
- Expect.equals(-0xabcdef, math.parseInt(" -0x00000abcdef ")); |
- Expect.equals(-0xABCDEF, math.parseInt(" -0x00000ABCDEF ")); |
- Expect.equals(10, math.parseInt("010")); |
- Expect.equals(-10, math.parseInt("-010")); |
- Expect.equals(10, math.parseInt(" 010 ")); |
- Expect.equals(-10, math.parseInt(" -010 ")); |
- Expect.equals(9, math.parseInt("09")); |
- Expect.equals(9, math.parseInt(" 09 ")); |
- Expect.equals(-9, math.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 ")); |