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

Unified Diff: frog/tests/await/src/await_test_helper.dart

Issue 9007053: await in frog: partial support for try-catch blocks (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 9 years 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 | « frog/tests/await/src/TryCatchTest.dart ('k') | frog/world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/tests/await/src/await_test_helper.dart
diff --git a/frog/tests/await/src/await_test_helper.dart b/frog/tests/await/src/await_test_helper.dart
index cc2d095e145a77646b1ffe246aeac4f7aafae7d0..1349382c5cc5e01bfc6d7c192c00570bfc99fa34 100644
--- a/frog/tests/await/src/await_test_helper.dart
+++ b/frog/tests/await/src/await_test_helper.dart
@@ -14,3 +14,10 @@ Future futureOf(value) {
setTimeout(() { c.complete(value); }, 0);
return f;
}
+
+Future errorOf(error) {
+ final c = new Completer();
+ final f = c.future;
+ setTimeout(() { c.completeException(error); }, 0);
+ return f;
+}
« no previous file with comments | « frog/tests/await/src/TryCatchTest.dart ('k') | frog/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698