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

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

Issue 23886004: Update dart:io tests to use asyncStart/asyncEnd (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 7 years, 3 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_input_stream_test.dart ('k') | tests/standalone/io/file_non_ascii_test.dart » ('j') | 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 846e88222e4d08a6d38284cb2e2709d1a9d44308..d66c458404928c1d698f195f15eb924405706d1a 100644
--- a/tests/standalone/io/file_invalid_arguments_test.dart
+++ b/tests/standalone/io/file_invalid_arguments_test.dart
@@ -3,9 +3,10 @@
// 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";
+
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
void testReadInvalidArgs(arg) {
String filename = getFilename("tests/vm/data/fixed_length_file");
@@ -78,7 +79,7 @@ void testFileSystemEntity() {
Expect.throws(() => ((x) => FileSystemEntity.isFileSync(x))(52));
Expect.throws(() => ((x) => FileSystemEntity.isDirectorySync(x))(52));
- ReceivePort keepAlive = new ReceivePort();
+ asyncStart();
futureThrows(((x) => FileSystemEntity.type(x))([1,2,3]))
.then((_) => futureThrows(((x, y) =>
FileSystemEntity.type(x, followLinks: y))(".", "why not?")))
@@ -89,7 +90,7 @@ void testFileSystemEntity() {
.then((_) => futureThrows(((x) => FileSystemEntity.isLink(x))(52)))
.then((_) => futureThrows(((x) => FileSystemEntity.isFile(x))(52)))
.then((_) => futureThrows(((x) => FileSystemEntity.isDirectory(x))(52)))
- .then((_) => keepAlive.close());
+ .then((_) => asyncEnd());
}
String getFilename(String path) {
« no previous file with comments | « tests/standalone/io/file_input_stream_test.dart ('k') | tests/standalone/io/file_non_ascii_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698