| 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 | 5 |
| 5 // Tests of interceptors. | 6 // Tests of interceptors. |
| 6 | 7 |
| 7 library interceptors_tests; | 8 library interceptors_tests; |
| 8 | 9 |
| 9 import 'js_backend_cps_ir_test.dart'; | 10 import 'js_backend_cps_ir.dart'; |
| 10 | 11 |
| 11 const List<TestEntry> tests = const [ | 12 const List<TestEntry> tests = const [ |
| 12 const TestEntry(""" | 13 const TestEntry(""" |
| 13 main() { | 14 main() { |
| 14 var g = 1; | 15 var g = 1; |
| 15 | 16 |
| 16 var x = g + 3; | 17 var x = g + 3; |
| 17 print(x); | 18 print(x); |
| 18 }""", | 19 }""", |
| 19 r""" | 20 r""" |
| 20 function() { | 21 function() { |
| 21 var g, v0; | 22 var g, v0; |
| 22 g = 1; | 23 g = 1; |
| 23 v0 = 3; | 24 v0 = 3; |
| 24 P.print(J.getInterceptor(g).$add(g, v0)); | 25 P.print(J.getInterceptor(g).$add(g, v0)); |
| 25 return null; | 26 return null; |
| 26 }"""), | 27 }"""), |
| 27 ]; | 28 ]; |
| 29 |
| 30 |
| 31 void main() { |
| 32 runTests(tests); |
| 33 } |
| OLD | NEW |