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

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

Issue 2980213002: Re-land beginning Dart 2.0 test migration. (Closed)
Patch Set: Created 3 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) 2013, 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 // Regression test for dart2js that used to be confused when inlining
6 // method that always aborts in a switch case.
7
8 import "package:expect/expect.dart";
9
10 foo() {
11 throw 42;
12 }
13
14 main() {
15 var exception;
16 try {
17 switch (42) {
18 case 42:
19 foo();
20 foo();
21 break;
22 }
23 } catch (e) {
24 exception = e;
25 }
26 Expect.equals(42, exception);
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698