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

Side by Side Diff: tests/language_2/catch_liveness_test.dart

Issue 2996533003: Migrate language block 46 - canonical_const ... char_escape. (Closed)
Patch Set: 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
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 @AssumeDynamic() 7 @AssumeDynamic()
8 @NoInline() 8 @NoInline()
9 foo() => 1; 9 foo() => 1;
10 10
11 @AssumeDynamic() 11 @AssumeDynamic()
12 @NoInline() 12 @NoInline()
13 throwException() => throw 'x'; 13 throwException() => throw 'x';
14 14
15 main() { 15 main() {
16 var x = 10; 16 var x = 10;
17 var e2 = null; 17 var e2 = null;
18 try { 18 try {
19 var t = foo(); 19 var t = foo();
20 throwException(); 20 throwException();
21 print(t); 21 print(t);
22 x = 3; 22 x = 3;
23 } catch (e) { 23 } catch (e) {
24 Expect.equals(10, x); 24 Expect.equals(10, x);
25 e2 = e; 25 e2 = e;
26 } 26 }
27 Expect.equals(10, x); 27 Expect.equals(10, x);
28 Expect.equals('x', e2); 28 Expect.equals('x', e2);
29 } 29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698