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

Unified Diff: tests/lib/math/math2_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/crypto/sha256_test.dart ('k') | tests/lib/math/math_parse_double_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "));
« no previous file with comments | « tests/lib/crypto/sha256_test.dart ('k') | tests/lib/math/math_parse_double_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698