| OLD | NEW |
| (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 import 'compiler_helper.dart'; |
| 6 |
| 7 const String TEST_ONE = r""" |
| 8 foo(a) { |
| 9 int x = 0; |
| 10 for (int i in a) { |
| 11 x += i; |
| 12 } |
| 13 return x; |
| 14 } |
| 15 """; |
| 16 |
| 17 const String TEST_TWO = r""" |
| 18 foo(a) { |
| 19 int x = 0; |
| 20 for (int i in a) { |
| 21 if (i == 5) continue; |
| 22 x += i; |
| 23 } |
| 24 return x; |
| 25 } |
| 26 """; |
| 27 |
| 28 main() { |
| 29 String generated = compile(TEST_ONE, entry: 'foo'); |
| 30 Expect.isTrue(!generated.contains(r'break')); |
| 31 generated = compile(TEST_TWO, entry: 'foo'); |
| 32 Expect.isTrue(generated.contains(r'continue')); |
| 33 } |
| OLD | NEW |