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

Unified Diff: tests/standalone/io/directory_error_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/directory_create_race_test.dart ('k') | tests/standalone/io/directory_fuzz_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/directory_error_test.dart
diff --git a/tests/standalone/io/directory_error_test.dart b/tests/standalone/io/directory_error_test.dart
index 902651366662ab7933eef0543ce23cea547a5e82..4cda21f3e02bb3c51c8e6e2d771ed28a4984c7a1 100644
--- a/tests/standalone/io/directory_error_test.dart
+++ b/tests/standalone/io/directory_error_test.dart
@@ -4,10 +4,11 @@
//
// Dart test program for testing error handling in directory I/O.
-import "package:expect/expect.dart";
import "dart:async";
import "dart:io";
-import "dart:isolate";
+
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
Directory tempDir() {
return new Directory('').createTempSync();
@@ -199,14 +200,13 @@ void runTest(Function test) {
var temp = new Directory('').createTempSync();
// Wait for the test to finish and delete the temporary directory.
- ReceivePort p = new ReceivePort();
- p.receive((x,y) {
- p.close();
- temp.deleteSync(recursive: true);
- });
+ asyncStart();
// Run the test.
- test(temp, () => p.toSendPort().send(null));
+ test(temp, () {
+ temp.deleteSync(recursive: true);
+ asyncEnd();
+ });
}
« no previous file with comments | « tests/standalone/io/directory_create_race_test.dart ('k') | tests/standalone/io/directory_fuzz_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698