OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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"; | |
6 | |
7 final x = foo(); | 5 final x = foo(); |
8 var x2 = foo2(); | 6 var x2 = foo2(); |
9 var x3 = foo3(); | 7 var x3 = foo3(); |
10 var x4 = foo4(); | 8 var x4 = foo4(); |
11 var x5 = foo5(); | 9 var x5 = foo5(); |
12 final x6 = foo6(); | 10 final x6 = foo6(); |
13 var x7 = x7 + 1; | 11 var x7 = x7 + 1; |
14 | 12 |
15 foo() { throw "interrupt initialization"; } | 13 foo() { throw "interrupt initialization"; } |
16 foo2() { x2 = 499; throw "interrupt initialization"; } | 14 foo2() { x2 = 499; throw "interrupt initialization"; } |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 Expect.equals(null, x3); | 47 Expect.equals(null, x3); |
50 | 48 |
51 Expect.equals(499, x4); | 49 Expect.equals(499, x4); |
52 | 50 |
53 Expect.equals(null, x5); | 51 Expect.equals(null, x5); |
54 | 52 |
55 Expect.equals(499, x6); | 53 Expect.equals(499, x6); |
56 | 54 |
57 Expect.throws(() => fib(x7), (e) => e is RuntimeError); | 55 Expect.throws(() => fib(x7), (e) => e is RuntimeError); |
58 } | 56 } |
OLD | NEW |