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

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

Issue 12609004: Change all File APIs to make the mode and encoding arguments named (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments and changed other use places Created 7 years, 9 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 | « sdk/lib/io/file_impl.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 59ad39103345fb5c5aba8eed97ad440a0d814d1b..c7b07e9222a1bc394ee12f1459d6925ce2ef748d 100644
--- a/tests/standalone/io/file_error_test.dart
+++ b/tests/standalone/io/file_error_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
@@ -50,7 +50,7 @@ void testOpenNonExistent() {
Expect.throws(() => file.openSync(),
(e) => checkOpenNonExistentFileException(e));
- var openFuture = file.open(FileMode.READ);
+ var openFuture = file.open(mode: FileMode.READ);
openFuture.then((raf) => Expect.fail("Unreachable code"))
.catchError((e) {
checkOpenNonExistentFileException(e.error);
@@ -236,7 +236,7 @@ void testReadAsTextNonExistent() {
Expect.throws(() => file.readAsStringSync(),
(e) => checkOpenNonExistentFileException(e));
- var readAsStringFuture = file.readAsString(Encoding.ASCII);
+ var readAsStringFuture = file.readAsString(encoding: Encoding.ASCII);
readAsStringFuture.then((data) => Expect.fail("Unreachable code"))
.catchError((e) {
checkOpenNonExistentFileException(e.error);
@@ -257,7 +257,7 @@ testReadAsLinesNonExistent() {
Expect.throws(() => file.readAsLinesSync(),
(e) => checkOpenNonExistentFileException(e));
- var readAsLinesFuture = file.readAsLines(Encoding.ASCII);
+ var readAsLinesFuture = file.readAsLines(encoding: Encoding.ASCII);
readAsLinesFuture.then((data) => Expect.fail("Unreachable code"))
.catchError((e) {
checkOpenNonExistentFileException(e.error);
@@ -292,7 +292,7 @@ createTestFile(callback) {
testWriteByteToReadOnlyFile() {
createTestFile((file, port) {
- var openedFile = file.openSync(FileMode.READ);
+ var openedFile = file.openSync(mode: FileMode.READ);
// Writing to read only file should throw an exception.
Expect.throws(() => openedFile.writeByteSync(0),
@@ -308,7 +308,7 @@ testWriteByteToReadOnlyFile() {
testWriteListToReadOnlyFile() {
createTestFile((file, port) {
- var openedFile = file.openSync(FileMode.READ);
+ var openedFile = file.openSync(mode: FileMode.READ);
List data = [0, 1, 2, 3];
// Writing to read only file should throw an exception.
@@ -325,10 +325,10 @@ testWriteListToReadOnlyFile() {
testTruncateReadOnlyFile() {
createTestFile((file, port) {
- var openedFile = file.openSync(FileMode.WRITE);
+ var openedFile = file.openSync(mode: FileMode.WRITE);
openedFile.writeByteSync(0);
openedFile.closeSync();
- openedFile = file.openSync(FileMode.READ);
+ openedFile = file.openSync(mode: FileMode.READ);
// Truncating read only file should throw an exception.
Expect.throws(() => openedFile.truncateSync(0),
@@ -352,7 +352,7 @@ bool checkFileClosedException(e) {
testOperateOnClosedFile() {
createTestFile((file, port) {
- var openedFile = file.openSync(FileMode.READ);
+ var openedFile = file.openSync(mode: FileMode.READ);
openedFile.closeSync();
List data = [0, 1, 2, 3];
« no previous file with comments | « sdk/lib/io/file_impl.dart ('k') | tests/standalone/io/file_fuzz_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698