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

Unified Diff: tests/standalone/io/string_decoder_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/standalone/io/socket_close_test.dart ('k') | tests/standalone/io/string_transformer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/string_decoder_test.dart
diff --git a/tests/standalone/io/string_decoder_test.dart b/tests/standalone/io/string_decoder_test.dart
index 6a81f957820a8b0245331ee3107a3e867bbfecea..495267653400aae070ced693ee84dd732de3b5b1 100644
--- a/tests/standalone/io/string_decoder_test.dart
+++ b/tests/standalone/io/string_decoder_test.dart
@@ -15,7 +15,7 @@ void test() {
controller.add([0xfd, 0x80, 0x80, 0x80, 0x80, 0x80]); // U+40000000
controller.close();
- var decoder = new StringDecoder(Encoding.UTF_8, '?'.charCodeAt(0));
+ var decoder = new StringDecoder(Encoding.UTF_8, '?'.codeUnitAt(0));
var stream = controller.stream.transform(decoder);
stream.reduce(
new StringBuffer(),
@@ -27,14 +27,14 @@ void test() {
.then((decoded) {
Expect.equals(7, decoded.length);
- var replacementChar = '?'.charCodeAt(0);
- Expect.equals(0xd800, decoded.charCodeAt(0));
- Expect.equals(0xdc00, decoded.charCodeAt(1));
- Expect.equals(0xdbff, decoded.charCodeAt(2));
- Expect.equals(0xdfff, decoded.charCodeAt(3));
- Expect.equals(replacementChar, decoded.charCodeAt(4));
- Expect.equals(replacementChar, decoded.charCodeAt(5));
- Expect.equals(replacementChar, decoded.charCodeAt(6));
+ var replacementChar = '?'.codeUnitAt(0);
+ Expect.equals(0xd800, decoded.codeUnitAt(0));
+ Expect.equals(0xdc00, decoded.codeUnitAt(1));
+ Expect.equals(0xdbff, decoded.codeUnitAt(2));
+ Expect.equals(0xdfff, decoded.codeUnitAt(3));
+ Expect.equals(replacementChar, decoded.codeUnitAt(4));
+ Expect.equals(replacementChar, decoded.codeUnitAt(5));
+ Expect.equals(replacementChar, decoded.codeUnitAt(6));
});
}
@@ -46,7 +46,7 @@ void testInvalid() {
controller.stream.transform(new StringDecoder()).listen((string) {
Expect.equals(outputLength, string.length);
for (var i = 0; i < outputLength; i++) {
- Expect.equals(0xFFFD, string.charCodeAt(i));
+ Expect.equals(0xFFFD, string.codeUnitAt(i));
}
});
}
« no previous file with comments | « tests/standalone/io/socket_close_test.dart ('k') | tests/standalone/io/string_transformer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698