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

Unified Diff: tests/standalone/io/async_catch_errors_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 | « no previous file | tests/standalone/io/delete_symlink_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/async_catch_errors_test.dart
diff --git a/tests/standalone/io/async_catch_errors_test.dart b/tests/standalone/io/async_catch_errors_test.dart
index 7107bf20ecf2f6712bb7d191801994036830aa47..d129c05c1371eacf58310218eae1d9f870d706d4 100644
--- a/tests/standalone/io/async_catch_errors_test.dart
+++ b/tests/standalone/io/async_catch_errors_test.dart
@@ -2,11 +2,12 @@
// 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:async';
-import 'dart:isolate';
import 'dart:io';
+import "package:async_helper/async_helper.dart";
+import "package:expect/expect.dart";
+
var events = [];
Future testSocketException() {
@@ -38,11 +39,11 @@ Future testFileException() {
main() {
// We keep a ReceivePort open until all tests are done. This way the VM will
// hang if the callbacks are not invoked and the test will time out.
- var timeOutPort = new ReceivePort();
+ asyncStart();
testSocketException()
.then((_) => testFileException())
.then((_) {
- timeOutPort.close();
+ asyncEnd();
Expect.listEquals(["SocketException", "FileException"],
events);
});
« no previous file with comments | « no previous file | tests/standalone/io/delete_symlink_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698