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

Unified Diff: tests/standalone/io/file_output_stream_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_non_ascii_test.dart ('k') | tests/standalone/io/file_stat_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/file_output_stream_test.dart
diff --git a/tests/standalone/io/file_output_stream_test.dart b/tests/standalone/io/file_output_stream_test.dart
index f71c962b667c5c7f3a82715ac7b53387b4426626..0981023bf8eacbe11dd0bfc2dc8bf4ab8e860fbc 100644
--- a/tests/standalone/io/file_output_stream_test.dart
+++ b/tests/standalone/io/file_output_stream_test.dart
@@ -3,20 +3,15 @@
// BSD-style license that can be found in the LICENSE file.
// Testing file input stream, VM-only, standalone test.
-import "package:expect/expect.dart";
import "dart:io";
-import "dart:isolate";
+
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
void testOpenOutputStreamSync() {
Directory tempDirectory = new Directory('').createTempSync();
- // Create a port for waiting on the final result of this test.
- ReceivePort done = new ReceivePort();
- done.receive((message, replyTo) {
- tempDirectory.deleteSync();
- done.close();
- });
-
+ asyncStart();
String fileName = "${tempDirectory.path}/test";
File file = new File(fileName);
file.createSync();
@@ -27,7 +22,8 @@ void testOpenOutputStreamSync() {
x.done.then((_) {
Expect.listEquals(file.readAsBytesSync(), data);
file.deleteSync();
- done.toSendPort().send("done");
+ tempDirectory.deleteSync();
+ asyncEnd();
});
}
« no previous file with comments | « tests/standalone/io/file_non_ascii_test.dart ('k') | tests/standalone/io/file_stat_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698