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

Side by Side Diff: tests/language/async_break_in_finally_test.dart

Issue 2985173002: Migrate language/async_backwards... ... language/async_star_take... (Closed)
Patch Set: Update tests to Dart 2.0. Created 3 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 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:
10 try {
11 return await 42;
12 } finally {
13 break label;
14 }
15 return await 43;
16 }
17
18 then42() async {
19 label:
20 try {
21 return await 42;
22 } finally {}
23 return await 43;
24 }
25
26 now43() {
27 label:
28 try {
29 return 42;
30 } finally {
31 break label;
32 }
33 return 43;
34 }
35
36 now42() {
37 label:
38 try {
39 return 42;
40 } finally {}
41 return 43;
42 }
43
44 test() async {
45 Expect.equals(42, await then42());
46 Expect.equals(43, await then43());
47 Expect.equals(42, now42());
48 Expect.equals(43, now43());
49 }
50
51 main() {
52 asyncStart();
53 test().then((_) => asyncEnd());
54 }
OLDNEW
« no previous file with comments | « tests/language/async_backwards_compatibility_2_test.dart ('k') | tests/language/async_continue_label_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698