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

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

Issue 14907009: dart:io | Tiny change to Link.exists(). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix static type errors in new test for dartc analyzer. 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 | « sdk/lib/io/link.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/file_invalid_arguments_test.dart
diff --git a/tests/standalone/io/file_invalid_arguments_test.dart b/tests/standalone/io/file_invalid_arguments_test.dart
index 6d5e040de260819053e3d0d9dba61ee1130d65a8..273a8c79d1b16994ed1018387566388d2a4f82d6 100644
--- a/tests/standalone/io/file_invalid_arguments_test.dart
+++ b/tests/standalone/io/file_invalid_arguments_test.dart
@@ -2,6 +2,7 @@
// 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.
+import "dart:async";
import "package:expect/expect.dart";
import "dart:io";
import "dart:isolate";
@@ -140,26 +141,28 @@ Future futureThrows(Future result) {
}
void testFileSystemEntity() {
- Expect.throws(() => FileSystemEntity.typeSync([1,2,3]));
- Expect.throws(() =>
- FileSystemEntity.typeSync(".", followLinks: "why not?"));
- Expect.throws(() => FileSystemEntity.identicalSync([1,2,3], "."));
- Expect.throws(() => FileSystemEntity.identicalSync("."));
- Expect.throws(() => FileSystemEntity.identicalSync(".", 52));
- Expect.throws(() => FileSystemEntity.isLinkSync(52));
- Expect.throws(() => FileSystemEntity.isFileSync(52));
- Expect.throws(() => FileSystemEntity.isDirectorySync(52));
+ Expect.throws(() => ((x) => FileSystemEntity.typeSync(x))([1,2,3]));
+ Expect.throws(() => ((x, y) =>
+ FileSystemEntity.typeSync(x, followLinks: y))(".", "why not?"));
+ Expect.throws(() => ((x, y) =>
+ FileSystemEntity.identicalSync(x, y))([1,2,3], "."));
+ Expect.throws(() => ((x, y) =>
+ FileSystemEntity.identicalSync(x, y))(".", 52));
+ Expect.throws(() => ((x) => FileSystemEntity.isLinkSync(x))(52));
+ Expect.throws(() => ((x) => FileSystemEntity.isFileSync(x))(52));
+ Expect.throws(() => ((x) => FileSystemEntity.isDirectorySync(x))(52));
ReceivePort keepAlive = new ReceivePort();
- futureThrows(FileSystemEntity.type([1,2,3]))
- .then((_) => futureThrows(
- FileSystemEntity.type(".", followLinks: "why not?")))
- .then((_) => futureThrows(FileSystemEntity.identical([1,2,3], ".")))
- .then((_) => Expect.throws(() =>FileSystemEntity.identical(".")))
- .then((_) => futureThrows(FileSystemEntity.identical(".", 52)))
- .then((_) => futureThrows(FileSystemEntity.isLink(52)))
- .then((_) => futureThrows(FileSystemEntity.isFile(52)))
- .then((_) => futureThrows(FileSystemEntity.isDirectory(52)))
+ futureThrows(((x) => FileSystemEntity.type(x))([1,2,3]))
+ .then((_) => futureThrows(((x, y) =>
+ FileSystemEntity.type(x, followLinks: y))(".", "why not?")))
+ .then((_) => futureThrows(((x, y) =>
+ FileSystemEntity.identical(x, y))([1,2,3], ".")))
+ .then((_) => futureThrows(((x, y) =>
+ FileSystemEntity.identical(x, y))(".", 52)))
+ .then((_) => futureThrows(((x) => FileSystemEntity.isLink(x))(52)))
+ .then((_) => futureThrows(((x) => FileSystemEntity.isFile(x))(52)))
+ .then((_) => futureThrows(((x) => FileSystemEntity.isDirectory(x))(52)))
.then((_) => keepAlive.close());
}
« no previous file with comments | « sdk/lib/io/link.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698