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

Unified Diff: tests/language/async_throw_in_catch_test.dart

Issue 989503002: Fix dart2js async error handling of finallies nested in finallies. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « pkg/compiler/lib/src/js/rewrite_async.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/async_throw_in_catch_test.dart
diff --git a/tests/language/async_throw_in_catch_test.dart b/tests/language/async_throw_in_catch_test.dart
index 1cb741efe50613eff0332dd07802694d6f15cf77..b3ecbab1f81ed3b6ce951cce45027a4e843e7f33 100644
--- a/tests/language/async_throw_in_catch_test.dart
+++ b/tests/language/async_throw_in_catch_test.dart
@@ -404,6 +404,40 @@ foo16(Tracer tracer) async {
tracer.trace("h");
}
+foo17(Tracer tracer) async {
+ try {
+ tracer.trace("a");
+ } finally {
+ try {
+ tracer.trace("b");
+ throw "Error";
+ } catch (error) {
+ await new Future.value(3); /// forceAwait: continued
+ Expect.equals("Error", error);
+ tracer.trace("c");
+ } finally {
+ tracer.trace("d");
+ }
+ tracer.trace("e");
+ }
+ tracer.trace("f");
+}
+
+foo18(Tracer tracer) async {
+ try {
+ tracer.trace("a");
+ } finally {
+ try {
+ tracer.trace("b");
+ } finally {
+ await new Future.value(3); /// forceAwait: continued
+ tracer.trace("c");
+ }
+ tracer.trace("d");
+ }
+ tracer.trace("e");
+}
+
runTest(expectedTrace, fun, [expectedError]) async {
Tracer tracer = new Tracer(expectedTrace);
try {
@@ -433,6 +467,8 @@ test() async {
await runTest("abcdefgX", foo14, "Error3");
await runTest("abcdefg", foo15);
await runTest("abcdfg", foo16);
+ await runTest("abcdef", foo17);
+ await runTest("abcde", foo18);
}
void main() {
« no previous file with comments | « pkg/compiler/lib/src/js/rewrite_async.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698