| 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_test.dart'; | 9 import 'js_backend_cps_ir_test.dart'; |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 P.print(2); | 109 P.print(2); |
| 110 } | 110 } |
| 111 P.print(3); | 111 P.print(3); |
| 112 return null; | 112 return null; |
| 113 }"""), | 113 }"""), |
| 114 const TestEntry(""" | 114 const TestEntry(""" |
| 115 main() { | 115 main() { |
| 116 if (1) { | 116 if (1) { |
| 117 print('bad'); | 117 print('bad'); |
| 118 } else { | 118 } else { |
| 119 print('ok'); | 119 print('good'); |
| 120 } | 120 } |
| 121 }""",""" | 121 }""",""" |
| 122 function() { | 122 function() { |
| 123 P.print("bad"); | 123 P.print("good"); |
| 124 return null; |
| 125 }"""), |
| 126 const TestEntry(""" |
| 127 foo() => 2; |
| 128 main() { |
| 129 if (foo()) { |
| 130 print('bad'); |
| 131 } else { |
| 132 print('good'); |
| 133 } |
| 134 }""",""" |
| 135 function() { |
| 136 V.foo(); |
| 137 P.print("good"); |
| 124 return null; | 138 return null; |
| 125 }"""), | 139 }"""), |
| 126 ]; | 140 ]; |
| OLD | NEW |