| 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 for basic functionality. | 6 // Tests for basic functionality. |
| 6 | 7 |
| 7 library basic_tests; | 8 library basic_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 foo(a, [b = "b"]) => b; | 14 foo(a, [b = "b"]) => b; |
| 14 bar(a, {b: "b", c: "c"}) => c; | 15 bar(a, {b: "b", c: "c"}) => c; |
| 15 main() { | 16 main() { |
| 16 foo(0); | 17 foo(0); |
| 17 foo(0, 1); | 18 foo(0, 1); |
| 18 bar(0); | 19 bar(0); |
| 19 bar(0, b: 1); | 20 bar(0, b: 1); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Method invocation | 95 // Method invocation |
| 95 const TestEntry(""" | 96 const TestEntry(""" |
| 96 main() { | 97 main() { |
| 97 print(new DateTime.now().isBefore(new DateTime.now())); | 98 print(new DateTime.now().isBefore(new DateTime.now())); |
| 98 }""", r""" | 99 }""", r""" |
| 99 function() { | 100 function() { |
| 100 P.print(P.DateTime$now().isBefore$1(P.DateTime$now())); | 101 P.print(P.DateTime$now().isBefore$1(P.DateTime$now())); |
| 101 return null; | 102 return null; |
| 102 }"""), | 103 }"""), |
| 103 ]; | 104 ]; |
| 105 |
| 106 |
| 107 void main() { |
| 108 runTests(tests); |
| 109 } |
| OLD | NEW |