| 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 for basic functionality. | 6 // Tests for basic functionality. |
| 7 | 7 |
| 8 library basic_tests; | 8 library basic_tests; |
| 9 | 9 |
| 10 import 'js_backend_cps_ir.dart'; | 10 import 'js_backend_cps_ir.dart'; |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 P.print(v0); | 163 P.print(v0); |
| 164 return null; | 164 return null; |
| 165 }"""), | 165 }"""), |
| 166 const TestEntry(""" | 166 const TestEntry(""" |
| 167 set foo(x) { print(x); } | 167 set foo(x) { print(x); } |
| 168 main() { foo = 42; } | 168 main() { foo = 42; } |
| 169 """, r""" | 169 """, r""" |
| 170 function() { | 170 function() { |
| 171 V.foo(42); | 171 V.foo(42); |
| 172 return null; | 172 return null; |
| 173 }"""), |
| 174 // Assert |
| 175 const TestEntry(""" |
| 176 foo() { print('X'); } |
| 177 main() { |
| 178 assert(true); |
| 179 assert(false); |
| 180 assert(foo()); |
| 181 print('Done'); |
| 182 }""", r""" |
| 183 function() { |
| 184 P.print("Done"); |
| 185 return null; |
| 173 }""") | 186 }""") |
| 174 ]; | 187 ]; |
| 175 | 188 |
| 176 | 189 |
| 177 void main() { | 190 void main() { |
| 178 runTests(tests); | 191 runTests(tests); |
| 179 } | 192 } |
| OLD | NEW |