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

Unified Diff: tests/corelib/string_fromcharcodes_test.dart

Issue 596763002: Optimize int.parse with a radix. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revert mis-merged patch that got into this CL by mistake. Created 6 years, 3 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 | « sdk/lib/core/string.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/string_fromcharcodes_test.dart
diff --git a/tests/corelib/string_fromcharcodes_test.dart b/tests/corelib/string_fromcharcodes_test.dart
index dd33abf79f73d2b5c96d7d73988b450c5abd67e4..1897453674b86ac1acfc8aca28e5f59467c648e8 100644
--- a/tests/corelib/string_fromcharcodes_test.dart
+++ b/tests/corelib/string_fromcharcodes_test.dart
@@ -130,19 +130,28 @@ main() {
test("BCDEFGH", iterable, 1);
test("H", iterable, 7);
test("", iterable, 8);
+ test("", iterable, 9);
// start = 0, end varies.
test("ABCDEFGH", iterable, 0);
test("A", iterable, 0, 1);
test("AB", iterable, 0, 2);
test("ABCDEFG", iterable, 0, 7);
test("ABCDEFGH", iterable, 0, 8);
+ test("ABCDEFGH", iterable, 0, 9);
test("", iterable, 0, 0);
+ test("", iterable, 0, -1);
// Both varying.
test("ABCDEFGH", iterable, 0, 8);
+ test("ABCDEFGH", iterable, 0, 9);
test("AB", iterable, 0, 2);
test("GH", iterable, 6, 8);
test("DE", iterable, 3, 5);
test("", iterable, 3, 3);
+ test("", iterable, 5, 3);
+ test("", iterable, 4, -1);
+ test("", iterable, 8, -1);
+ test("", iterable, 0, -1);
+ test("", iterable, 9, 9);
}
// Can split surrogates in input, but not a single big code point.
test(leadSurrogate, [0xDBFF, 0xDFFF], 0, 1);
@@ -171,14 +180,7 @@ main() {
test(string.substring(i, i + j), iterable, i, i + j);
}
}
-
- Expect.throws(() => new String.fromCharCodes(iterable, -1));
- Expect.throws(() => new String.fromCharCodes(iterable, 0, -1));
- Expect.throws(() => new String.fromCharCodes(iterable, 2, 1));
- Expect.throws(() => new String.fromCharCodes(iterable, 0, length + 1));
- Expect.throws(() => new String.fromCharCodes(iterable, length + 1));
- Expect.throws(() => new String.fromCharCodes(iterable, length + 1,
- length + 2));
+ Expect.equals(string, new String.fromCharCodes(iterable, 0, length + 1));
}
}
« no previous file with comments | « sdk/lib/core/string.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698