| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 | 4 |
| 5 // Tests of interceptors. | 5 // Tests of interceptors. |
| 6 | 6 |
| 7 library constructor_test; | 7 library constructor_test; |
| 8 | 8 |
| 9 import 'js_backend_cps_ir.dart'; | 9 import 'js_backend_cps_ir.dart'; |
| 10 | 10 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 A.b(this.x); | 209 A.b(this.x); |
| 210 } | 210 } |
| 211 main() { | 211 main() { |
| 212 print(new A().x); | 212 print(new A().x); |
| 213 }""", r""" | 213 }""", r""" |
| 214 function() { | 214 function() { |
| 215 return new V.A(1); | 215 return new V.A(1); |
| 216 }"""), | 216 }"""), |
| 217 | 217 |
| 218 | 218 |
| 219 const TestEntry.forMethod('function(Foo#make)', r""" | 219 const TestEntry.forMethod('factory_constructor(Foo#make)', r""" |
| 220 class Foo { | 220 class Foo { |
| 221 factory Foo.make(x) { | 221 factory Foo.make(x) { |
| 222 print('Foo'); | 222 print('Foo'); |
| 223 return new Foo.create(x); | 223 return new Foo.create(x); |
| 224 } | 224 } |
| 225 var x; | 225 var x; |
| 226 Foo.create(this.x); | 226 Foo.create(this.x); |
| 227 } | 227 } |
| 228 main() { | 228 main() { |
| 229 print(new Foo.make(5)); | 229 print(new Foo.make(5)); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 259 new A(5).typevar; | 259 new A(5).typevar; |
| 260 }""", r""" | 260 }""", r""" |
| 261 function() { | 261 function() { |
| 262 V.B$(5, P.$int).get$typevar(); | 262 V.B$(5, P.$int).get$typevar(); |
| 263 }"""), | 263 }"""), |
| 264 ]; | 264 ]; |
| 265 | 265 |
| 266 void main() { | 266 void main() { |
| 267 runTests(tests); | 267 runTests(tests); |
| 268 } | 268 } |
| OLD | NEW |