| 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 // VMOptions=-DUSE_CPS_IR=true | 4 // VMOptions=-DUSE_CPS_IR=true |
| 5 | 5 |
| 6 // Tests of control flow statements. | 6 // Tests of control flow statements. |
| 7 | 7 |
| 8 library control_flow_tests; | 8 library control_flow_tests; |
| 9 | 9 |
| 10 import 'js_backend_cps_ir.dart'; | 10 import 'js_backend_cps_ir.dart'; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 const TestEntry(""" | 126 const TestEntry(""" |
| 127 foo() => 2; | 127 foo() => 2; |
| 128 main() { | 128 main() { |
| 129 if (foo()) { | 129 if (foo()) { |
| 130 print('bad'); | 130 print('bad'); |
| 131 } else { | 131 } else { |
| 132 print('good'); | 132 print('good'); |
| 133 } | 133 } |
| 134 }""",""" | 134 }""",""" |
| 135 function() { | 135 function() { |
| 136 V.foo(); | 136 P.identical(V.foo(), true) ? P.print("bad") : P.print("good"); |
| 137 P.print("good"); | |
| 138 return null; | 137 return null; |
| 139 }"""), | 138 }"""), |
| 140 ]; | 139 ]; |
| 141 | 140 |
| 142 void main() { | 141 void main() { |
| 143 runTests(tests); | 142 runTests(tests); |
| 144 } | 143 } |
| OLD | NEW |