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

Unified Diff: tests/standalone/io/file_error_test.dart

Issue 14018007: Rename RandomAccessFile.readList and RandomAccessFile.writeList to RandomAccessFile.readInto and Ra… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 7 years, 8 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/dart_std_io_pipe_test.dart ('k') | tests/standalone/io/file_fuzz_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/file_error_test.dart
diff --git a/tests/standalone/io/file_error_test.dart b/tests/standalone/io/file_error_test.dart
index e1741fd36f9d0b871486a0243701e3114e971787..30b10f2347b9a5b8043fb7741c45fa7ed7d519b8 100644
--- a/tests/standalone/io/file_error_test.dart
+++ b/tests/standalone/io/file_error_test.dart
@@ -307,17 +307,17 @@ testWriteByteToReadOnlyFile() {
});
}
-testWriteListToReadOnlyFile() {
+testWriteFromToReadOnlyFile() {
createTestFile((file, port) {
var openedFile = file.openSync(mode: FileMode.READ);
List data = [0, 1, 2, 3];
// Writing to read only file should throw an exception.
- Expect.throws(() => openedFile.writeListSync(data, 0, data.length),
+ Expect.throws(() => openedFile.writeFromSync(data, 0, data.length),
(e) => checkWriteReadOnlyFileException(e));
- var writeListFuture = openedFile.writeList(data, 0, data.length);
- writeListFuture.catchError((e) {
+ var writeFromFuture = openedFile.writeFrom(data, 0, data.length);
+ writeFromFuture.catchError((e) {
checkWriteReadOnlyFileException(e.error);
openedFile.close().then((ignore) => port.send(null));
});
@@ -361,9 +361,9 @@ testOperateOnClosedFile() {
(e) => checkFileClosedException(e));
Expect.throws(() => openedFile.writeByteSync(0),
(e) => checkFileClosedException(e));
- Expect.throws(() => openedFile.writeListSync(data, 0, data.length),
+ Expect.throws(() => openedFile.writeFromSync(data, 0, data.length),
(e) => checkFileClosedException(e));
- Expect.throws(() => openedFile.readListSync(data, 0, data.length),
+ Expect.throws(() => openedFile.readIntoSync(data, 0, data.length),
(e) => checkFileClosedException(e));
Expect.throws(() => openedFile.writeStringSync("Hello"),
(e) => checkFileClosedException(e));
@@ -395,12 +395,12 @@ testOperateOnClosedFile() {
writeByteFuture.then((ignore) => Expect.fail("Unreachable code"))
.catchError(_errorHandler);
errorCount++;
- var readListFuture = openedFile.readList(data, 0, data.length);
- readListFuture.then((bytesRead) => Expect.fail("Unreachable code"))
+ var readIntoFuture = openedFile.readInto(data, 0, data.length);
+ readIntoFuture.then((bytesRead) => Expect.fail("Unreachable code"))
.catchError(_errorHandler);
errorCount++;
- var writeListFuture = openedFile.writeList(data, 0, data.length);
- writeListFuture.then((ignore) => Expect.fail("Unreachable code"))
+ var writeFromFuture = openedFile.writeFrom(data, 0, data.length);
+ writeFromFuture.then((ignore) => Expect.fail("Unreachable code"))
.catchError(_errorHandler);
errorCount++;
var writeStringFuture = openedFile.writeString("Hello");
@@ -486,7 +486,7 @@ main() {
testReadAsTextNonExistent();
testReadAsLinesNonExistent();
testWriteByteToReadOnlyFile();
- testWriteListToReadOnlyFile();
+ testWriteFromToReadOnlyFile();
testTruncateReadOnlyFile();
testOperateOnClosedFile();
testRepeatedlyCloseFile();
« no previous file with comments | « tests/standalone/io/dart_std_io_pipe_test.dart ('k') | tests/standalone/io/file_fuzz_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698