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

Unified Diff: tests/standalone/io/directory_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
Index: tests/standalone/io/directory_invalid_arguments_test.dart
diff --git a/tests/standalone/io/directory_invalid_arguments_test.dart b/tests/standalone/io/directory_invalid_arguments_test.dart
index 1b35aa0a877bdd3e3af1ed5019a967be281df07f..e3e6bb61de81ff9f807035aaf49b48322b24a526 100644
--- a/tests/standalone/io/directory_invalid_arguments_test.dart
+++ b/tests/standalone/io/directory_invalid_arguments_test.dart
@@ -2,12 +2,13 @@
// 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 "package:expect/expect.dart";
import "dart:io";
-import "dart:isolate";
+
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
void testFailingList(Directory d, var recursive) {
- var port = new ReceivePort();
+ asyncStart();
int errors = 0;
d.list(recursive: recursive).listen(
() => Expect.fail("Unexpected listing result"),
@@ -15,8 +16,8 @@ void testFailingList(Directory d, var recursive) {
errors += 1;
},
onDone: () {
- port.close();
Expect.equals(1, errors);
+ asyncEnd();
});
Expect.equals(0, errors);
}
« no previous file with comments | « tests/standalone/io/directory_fuzz_test.dart ('k') | tests/standalone/io/directory_list_nonexistent_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698