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

Unified Diff: tests/lib/async/future_delayed_error_test.dart

Issue 23522012: Replace ReceivePorts with asyncStart|End in some tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove bad comment. Created 7 years, 4 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/lib/async/catch_errors_test.dart ('k') | tests/lib/async/future_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/future_delayed_error_test.dart
diff --git a/tests/lib/async/future_delayed_error_test.dart b/tests/lib/async/future_delayed_error_test.dart
index be16cf03b6597eaefb2f7c0216a9e68d1c956110..b22da988db60e0555a9036d19cef0294ab1281b8 100644
--- a/tests/lib/async/future_delayed_error_test.dart
+++ b/tests/lib/async/future_delayed_error_test.dart
@@ -4,18 +4,16 @@
library future_delayed_error_test;
+import 'package:async_helper/async_helper.dart';
import "package:expect/expect.dart";
import 'dart:async';
-import 'dart:isolate';
testImmediateError() {
- // An open ReceivePort keeps the VM running. If the error-handler below is not
- // executed then the test will fail with a timeout.
- var port = new ReceivePort();
+ asyncStart();
var future = new Future.error("error");
future.catchError((error) {
- port.close();
Expect.equals(error, "error");
+ asyncEnd();
});
}
@@ -26,10 +24,10 @@ Future get completedFuture {
}
testDelayedError() {
- var port = new ReceivePort();
+ asyncStart();
completedFuture.catchError((error) {
- port.close();
Expect.equals(error, "foobar");
+ asyncEnd();
});
}
« no previous file with comments | « tests/lib/async/catch_errors_test.dart ('k') | tests/lib/async/future_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698