| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // Tests of control flow statements. | 5 // Tests of control flow statements. |
| 6 | 6 |
| 7 library control_flow_tests; | 7 library control_flow_tests; |
| 8 | 8 |
| 9 import 'js_backend_cps_ir.dart'; | 9 import 'js_backend_cps_ir.dart'; |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 main() { | 51 main() { |
| 52 for (int i = 0; foo(true); i = foo(i)) { | 52 for (int i = 0; foo(true); i = foo(i)) { |
| 53 print(1); | 53 print(1); |
| 54 if (foo(false)) break; | 54 if (foo(false)) break; |
| 55 } | 55 } |
| 56 print(2); | 56 print(2); |
| 57 }""", """ | 57 }""", """ |
| 58 function() { | 58 function() { |
| 59 var i = 0; | 59 var i = 0; |
| 60 while (P.identical(V.foo(true), true)) { | 60 while (V.foo(true) === true) { |
| 61 P.print(1); | 61 P.print(1); |
| 62 if (P.identical(V.foo(false), true)) | 62 if (V.foo(false) === true) |
| 63 break; | 63 break; |
| 64 i = V.foo(i); | 64 i = V.foo(i); |
| 65 } | 65 } |
| 66 P.print(2); | 66 P.print(2); |
| 67 }"""), | 67 }"""), |
| 68 const TestEntry(""" | 68 const TestEntry(""" |
| 69 foo(a) => a; | 69 foo(a) => a; |
| 70 | 70 |
| 71 main() { | 71 main() { |
| 72 if (foo(true)) { | 72 if (foo(true)) { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 H.throwConcurrentModificationError(xs); | 171 H.throwConcurrentModificationError(xs); |
| 172 i = i + 1; | 172 i = i + 1; |
| 173 i1 = i1 + 1; | 173 i1 = i1 + 1; |
| 174 } | 174 } |
| 175 }"""), | 175 }"""), |
| 176 ]; | 176 ]; |
| 177 | 177 |
| 178 void main() { | 178 void main() { |
| 179 runTests(tests); | 179 runTests(tests); |
| 180 } | 180 } |
| OLD | NEW |