Index: tests/standalone/io/file_test.dart |
diff --git a/tests/standalone/io/file_test.dart b/tests/standalone/io/file_test.dart |
index 4d7093d61b3eb5fd8d34574983846fdb1a55d7ad..7d4399440c3cd431ef9a93261360bfabf0cf7c8c 100644 |
--- a/tests/standalone/io/file_test.dart |
+++ b/tests/standalone/io/file_test.dart |
@@ -399,7 +399,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(); |
@@ -422,7 +422,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; |
OutputStream outStream = file.openOutputStream(); |
outStream.write(buffer); |
outStream.onNoPendingWrites = () { |
@@ -459,7 +459,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; |
OutputStream outStream = file.openOutputStream(); |
outStream.writeString("abcdABCD"); |
outStream.writeString("abcdABCD", Encoding.UTF_8); |
@@ -1043,11 +1043,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"); |
@@ -1082,12 +1082,12 @@ 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); |
Expect.throws(() { new File(name).readAsStringSync(Encoding.ASCII); }); |
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() { |