| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 function() { | 100 function() { |
| 101 return null; | 101 return null; |
| 102 }"""), | 102 }"""), |
| 103 // Constructor invocation | 103 // Constructor invocation |
| 104 const TestEntry(""" | 104 const TestEntry(""" |
| 105 main() { | 105 main() { |
| 106 print(new Set()); | 106 print(new Set()); |
| 107 print(new Set.from([1, 2, 3])); | 107 print(new Set.from([1, 2, 3])); |
| 108 }""", r""" | 108 }""", r""" |
| 109 function() { | 109 function() { |
| 110 P.print(P.Set_Set(null)); | 110 P.print(P.LinkedHashSet_LinkedHashSet(null)); |
| 111 P.print(P.Set_Set$from([1, 2, 3], null)); | 111 P.print(P.LinkedHashSet_LinkedHashSet$from([1, 2, 3], null)); |
| 112 return null; | 112 return null; |
| 113 }"""), | 113 }"""), |
| 114 // Call synthetic constructor. | 114 // Call synthetic constructor. |
| 115 const TestEntry(""" | 115 const TestEntry(""" |
| 116 class C {} | 116 class C {} |
| 117 main() { | 117 main() { |
| 118 print(new C()); | 118 print(new C()); |
| 119 }"""), | 119 }"""), |
| 120 // Method invocation | 120 // Method invocation |
| 121 const TestEntry(""" | 121 const TestEntry(""" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 function() { | 183 function() { |
| 184 P.print("Done"); | 184 P.print("Done"); |
| 185 return null; | 185 return null; |
| 186 }""") | 186 }""") |
| 187 ]; | 187 ]; |
| 188 | 188 |
| 189 | 189 |
| 190 void main() { | 190 void main() { |
| 191 runTests(tests); | 191 runTests(tests); |
| 192 } | 192 } |
| OLD | NEW |