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

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

Issue 10850034: Rename BadNumberFormatException -> FormatException. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 8 years, 4 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/args/args_test.dart ('k') | tests/lib/unittest/matchers_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 719848e1626dbba2febec171bfb4edbecbd5e473..2481ec7786c2ed64a07e53db5e8c70fb6c9847ed 100644
--- a/tests/lib/math/math_test.dart
+++ b/tests/lib/math/math_test.dart
@@ -151,11 +151,11 @@ class MathTest {
checkVeryClose(SQRT1_2, pow(0.5, 0.5));
}
- static bool parseIntThrowsBadNumberFormatException(str) {
+ static bool parseIntThrowsFormatException(str) {
try {
parseInt(str);
return false;
- } catch (BadNumberFormatException e) {
+ } catch (FormatException e) {
return true;
}
}
@@ -205,37 +205,37 @@ class MathTest {
Expect.equals(9, parseInt("09"));
Expect.equals(9, parseInt(" 09 "));
Expect.equals(-9, parseInt("-09"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("1b"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" 1b "));
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" 1 b "));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("1e2"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" 1e2 "));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("00x12"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" 00x12 "));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("-1b"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" -1b "));
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" -1 b "));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("-1e2"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" -1e2 "));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("-00x12"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" -00x12 "));
- Expect.equals(true, parseIntThrowsBadNumberFormatException(" -00x12 "));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("0x0x12"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("0.1"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("0x3.1"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("5."));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("+-5"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("-+5"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("--5"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("++5"));
- Expect.equals(true, parseIntThrowsBadNumberFormatException("+ 5"));
- 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 "));
+ Expect.equals(true, parseIntThrowsFormatException("1b"));
+ Expect.equals(true, parseIntThrowsFormatException(" 1b "));
+ Expect.equals(true, parseIntThrowsFormatException(" 1 b "));
+ Expect.equals(true, parseIntThrowsFormatException("1e2"));
+ Expect.equals(true, parseIntThrowsFormatException(" 1e2 "));
+ Expect.equals(true, parseIntThrowsFormatException("00x12"));
+ Expect.equals(true, parseIntThrowsFormatException(" 00x12 "));
+ Expect.equals(true, parseIntThrowsFormatException("-1b"));
+ Expect.equals(true, parseIntThrowsFormatException(" -1b "));
+ Expect.equals(true, parseIntThrowsFormatException(" -1 b "));
+ Expect.equals(true, parseIntThrowsFormatException("-1e2"));
+ Expect.equals(true, parseIntThrowsFormatException(" -1e2 "));
+ Expect.equals(true, parseIntThrowsFormatException("-00x12"));
+ Expect.equals(true, parseIntThrowsFormatException(" -00x12 "));
+ Expect.equals(true, parseIntThrowsFormatException(" -00x12 "));
+ Expect.equals(true, parseIntThrowsFormatException("0x0x12"));
+ Expect.equals(true, parseIntThrowsFormatException("0.1"));
+ Expect.equals(true, parseIntThrowsFormatException("0x3.1"));
+ Expect.equals(true, parseIntThrowsFormatException("5."));
+ Expect.equals(true, parseIntThrowsFormatException("+-5"));
+ Expect.equals(true, parseIntThrowsFormatException("-+5"));
+ Expect.equals(true, parseIntThrowsFormatException("--5"));
+ Expect.equals(true, parseIntThrowsFormatException("++5"));
+ Expect.equals(true, parseIntThrowsFormatException("+ 5"));
+ 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/lib/args/args_test.dart ('k') | tests/lib/unittest/matchers_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698