Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Unified Diff: tests/lib/math/math_test.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/lib/math/math_parse_double_test.dart ('k') | tests/standalone/io/chunked_stream_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "));
« no previous file with comments | « tests/lib/math/math_parse_double_test.dart ('k') | tests/standalone/io/chunked_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698