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

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

Issue 17103002: Remove support for + prefix in number literals (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/language/unary_test.dart ('k') | tests/lib/math/math_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
===================================================================
--- tests/lib/math/math2_test.dart (revision 24043)
+++ tests/lib/math/math2_test.dart (working copy)
@@ -209,6 +209,11 @@
Expect.equals(9, int.parse("09"));
Expect.equals(9, int.parse(" 09 "));
Expect.equals(-9, int.parse("-09"));
+ Expect.equals(0x1234567890, int.parse("+0x1234567890"));
+ Expect.equals(0x1234567890, int.parse(" +0x1234567890 "));
+ Expect.equals(0x100, int.parse("+0x100"));
+ Expect.equals(0x100, int.parse(" +0x100 "));
+
Expect.equals(true, parseIntThrowsFormatException("1b"));
Expect.equals(true, parseIntThrowsFormatException(" 1b "));
Expect.equals(true, parseIntThrowsFormatException(" 1 b "));
@@ -236,10 +241,6 @@
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() {
« no previous file with comments | « tests/language/unary_test.dart ('k') | tests/lib/math/math_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698