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

Unified Diff: tests/language/await_exceptions_test.dart

Issue 839323003: Implementation of async-await transformation on js ast. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments Created 5 years, 10 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/language/asyncstar_yieldstar_test.dart ('k') | tests/language/await_for_cancel_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/await_exceptions_test.dart
diff --git a/tests/language/await_exceptions_test.dart b/tests/language/await_exceptions_test.dart
index 02779cea719144f7ae801f36edbf54c0c0ac07ae..f1d39a199411fe5ab3001bc0f73b5e606d8a239c 100644
--- a/tests/language/await_exceptions_test.dart
+++ b/tests/language/await_exceptions_test.dart
@@ -5,6 +5,7 @@
// VMOptions=--optimization-counter-threshold=5
import 'package:expect/expect.dart';
+import "package:async_helper/async_helper.dart";
import 'dart:async';
@@ -69,7 +70,7 @@ test2() async {
return '!';
}
-main() async {
+test() async {
var result;
for (int i = 0; i < 10; i++) {
await test0();
@@ -77,4 +78,21 @@ main() async {
result = await test2();
Expect.equals('abcd', result);
}
+ await 1;
+}
+
+foo() {
+ throw "Error";
+}
+
+awaitFoo() async {
+ await foo();
+}
+
+main() {
+ asyncStart();
+ test().then((_) => awaitFoo().then(
+ (_) => Expect.fail("Should have thrown"),
+ onError: (error) => Expect.equals("Error", error)))
+ .whenComplete(asyncEnd);
}
« no previous file with comments | « tests/language/asyncstar_yieldstar_test.dart ('k') | tests/language/await_for_cancel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698