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

Unified Diff: tests/corelib/math_test.dart

Issue 10456060: Eliminate unary plus with hex literals (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/corelib/math_parse_double_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/math_test.dart
===================================================================
--- tests/corelib/math_test.dart (revision 8171)
+++ tests/corelib/math_test.dart (working copy)
@@ -171,16 +171,12 @@
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(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(256, Math.parseInt(" +0x100 "));
Expect.equals(-256, Math.parseInt(" -0x100 "));
Expect.equals(0xabcdef, Math.parseInt("0xabcdef"));
Expect.equals(0xABCDEF, Math.parseInt("0xABCDEF"));
@@ -233,6 +229,10 @@
Expect.equals(true, parseIntThrowsBadNumberFormatException("- 5"));
Expect.equals(true, parseIntThrowsBadNumberFormatException(""));
Expect.equals(true, parseIntThrowsBadNumberFormatException(" "));
+ Expect.equals(true, parseIntThrowsBadNumberFormatException("+0x1234567890"));
+ Expect.equals(true, parseIntThrowsBadNumberFormatException(" +0x1234567890 "));
+ Expect.equals(true, parseIntThrowsBadNumberFormatException("+0x100"));
+ Expect.equals(true, parseIntThrowsBadNumberFormatException(" +0x100 "));
}
static testMain() {
« no previous file with comments | « tests/corelib/math_parse_double_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698