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

Unified Diff: tests/standalone/io/file_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/file_system_links_test.dart ('k') | tests/standalone/io/http_client_connect_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/file_test.dart
diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart
index a8daa32655ddf0d14a035ea3335d951dda57a638..f28a7c59dde257cda437082ea5a0f6195f11928d 100644
--- a/tests/standalone/io/file_test.dart
+++ b/tests/standalone/io/file_test.dart
@@ -308,7 +308,7 @@ class FileTest {
File file = new File(filename);
file.createSync();
Expect.isTrue(new File(filename).existsSync());
- List<int> buffer = content.charCodes;
+ List<int> buffer = content.codeUnits;
RandomAccessFile openedFile = file.openSync(FileMode.WRITE);
openedFile.writeListSync(buffer, 0, buffer.length);
openedFile.closeSync();
@@ -331,7 +331,7 @@ class FileTest {
String filename = tempDirectory.path.concat("/outstream_write_append");
File file = new File(filename);
file.createSync();
- List<int> buffer = content.charCodes;
+ List<int> buffer = content.codeUnits;
var output = file.openWrite();
output.add(buffer);
output.close();
@@ -363,7 +363,7 @@ class FileTest {
String filename = tempDirectory.path.concat("/outstream_write_string");
File file = new File(filename);
file.createSync();
- List<int> buffer = content.charCodes;
+ List<int> buffer = content.codeUnits;
var output = file.openWrite();
output.addString("abcdABCD");
output.addString("abcdABCD", Encoding.UTF_8);
@@ -940,11 +940,11 @@ class FileTest {
f.readAsString(Encoding.UTF_8).then((text) {
Expect.equals(6, text.length);
var expected = [955, 120, 46, 32, 120, 10];
- Expect.listEquals(expected, text.charCodes);
+ Expect.listEquals(expected, text.codeUnits);
f.readAsString(Encoding.ISO_8859_1).then((text) {
Expect.equals(7, text.length);
var expected = [206, 187, 120, 46, 32, 120, 10];
- Expect.listEquals(expected, text.charCodes);
+ Expect.listEquals(expected, text.codeUnits);
var readAsStringFuture = f.readAsString(Encoding.ASCII);
readAsStringFuture.then((text) {
Expect.fail("Non-ascii char should cause error");
@@ -979,15 +979,15 @@ class FileTest {
text = new File(name).readAsStringSync();
Expect.equals(6, text.length);
var expected = [955, 120, 46, 32, 120, 10];
- Expect.listEquals(expected, text.charCodes);
+ Expect.listEquals(expected, text.codeUnits);
text = new File(name).readAsStringSync(Encoding.ASCII);
// Default replacement character is '?', char code 63.
expected = [63, 63, 120, 46, 32, 120, 10];
- Expect.listEquals(expected, text.charCodes);
+ Expect.listEquals(expected, text.codeUnits);
text = new File(name).readAsStringSync(Encoding.ISO_8859_1);
expected = [206, 187, 120, 46, 32, 120, 10];
Expect.equals(7, text.length);
- Expect.listEquals(expected, text.charCodes);
+ Expect.listEquals(expected, text.codeUnits);
}
static void testReadAsTextSyncEmptyFile() {
« no previous file with comments | « tests/standalone/io/file_system_links_test.dart ('k') | tests/standalone/io/http_client_connect_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698