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

Unified Diff: tests/corelib/string_codeunits_test.dart

Issue 12282038: Remove deprecated string features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge to head Created 7 years, 10 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/string_character_test.dart ('k') | tests/corelib/string_fromcharcode_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/string_codeunits_test.dart
diff --git a/tests/corelib/string_codeunits_test.dart b/tests/corelib/string_codeunits_test.dart
index 81625c5d186c3bd1787ff71a3401ef89bd44191e..6e3a282a3ae20b12d11c780f3917a967a7d78dc4 100644
--- a/tests/corelib/string_codeunits_test.dart
+++ b/tests/corelib/string_codeunits_test.dart
@@ -31,11 +31,14 @@ main() {
test("\x00\u0000\u{000000}");
test("\u{ffff}\u{10000}\u{10ffff}");
String string = new String.fromCharCodes(
- [0xdc00, 0xd800, 61, 0xd800, 0xdc00, 62, 0xdc00, 0xd800]);
+ [0xdc00, 0xd800, 61, 0xd9ab, 0xd9ab, 0xddef, 0xddef, 62, 0xdc00, 0xd800]);
+ test(string);
+ string = "\x00\x7f\xff\u0100\ufeff\uffef\uffff"
+ "\u{10000}\u{12345}\u{1d800}\u{1dc00}\u{1ffef}\u{1ffff}";
test(string);
- // Setting position in the middle of a surrogate pair is not allowed.
- var r = new CodeUnits("\u{10000}");
+ // Reading each unit of a surrogate pair works.
+ var r = "\u{10000}".codeUnits;
var it = r.iterator;
Expect.isTrue(it.moveNext());
Expect.equals(0xD800, it.current);
« no previous file with comments | « tests/corelib/string_character_test.dart ('k') | tests/corelib/string_fromcharcode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698