OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 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 | 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 // Dart test program to test check that we don't fail to compile when an | 5 // Dart test program to test check that we don't fail to compile when an |
6 // inlinable method contains a throw. | 6 // inlinable method contains a throw. |
7 | 7 |
| 8 import 'package:expect/expect.dart'; |
| 9 |
8 var x = false; | 10 var x = false; |
9 | 11 |
10 bool called; | 12 bool called; |
11 | 13 |
12 bool callMeTrue() { | 14 bool callMeTrue() { |
13 called = true; | 15 called = true; |
14 return true; | 16 return true; |
15 } | 17 } |
16 | 18 |
17 bool callMeFalse() { | 19 bool callMeFalse() { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 testCallThenThrow(call3c); | 172 testCallThenThrow(call3c); |
171 testCallThenThrow(call4c); | 173 testCallThenThrow(call4c); |
172 Expect.throws(sendSet); | 174 Expect.throws(sendSet); |
173 testCallThenThrow(sendSetCallThrow); | 175 testCallThenThrow(sendSetCallThrow); |
174 Expect.throws(isSend); | 176 Expect.throws(isSend); |
175 testNoThrow(vile); | 177 testNoThrow(vile); |
176 testCallThenThrow(dovile); | 178 testCallThenThrow(dovile); |
177 testCall(dovileBreak); | 179 testCall(dovileBreak); |
178 testCallThenThrow(dovileContinue); | 180 testCallThenThrow(dovileContinue); |
179 } | 181 } |
OLD | NEW |