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

Side by Side Diff: test/codegen/language/async_break_in_finally_test.dart

Issue 1243503007: fixes #221, initial sync*, async, async* implementation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 import "package:expect/expect.dart";
6 import "package:async_helper/async_helper.dart";
7
8 then43() async {
9 label: try {
10 return await 42;
11 } finally {
12 break label;
13 }
14 return await 43;
15 }
16
17 then42() async {
18 label: try {
19 return await 42;
20 } finally {
21 }
22 return await 43;
23 }
24
25 now43() {
26 label: try {
27 return 42;
28 } finally {
29 break label;
30 }
31 return 43;
32 }
33
34 now42() {
35 label: try {
36 return 42;
37 } finally {
38 }
39 return 43;
40 }
41
42 test() async {
43 Expect.equals(42, await then42());
44 Expect.equals(43, await then43());
45 Expect.equals(42, now42());
46 Expect.equals(43, now43());
47 }
48
49 main() {
50 asyncStart();
51 test().then((_) => asyncEnd());
52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698