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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 Sub(x, this.y) : super(x) { | 89 Sub(x, this.y) : super(x) { |
90 print(x); | 90 print(x); |
91 } | 91 } |
92 } | 92 } |
93 main() { | 93 main() { |
94 print(new Sub(1, 2).x); | 94 print(new Sub(1, 2).x); |
95 }""", | 95 }""", |
96 r""" | 96 r""" |
97 function(x, y) { | 97 function(x, y) { |
98 var _box_0 = {}, v0 = new V.Sub(y, new V.Base_closure(_box_0)); | 98 var _box_0 = {}, v0 = new V.Sub(y, new V.Base_closure(_box_0)); |
99 _box_0._captured_x1_0 = x; | 99 _box_0.x1 = x; |
100 v0.Base0$0(); | 100 v0.Base0$0(); |
101 v0.Base$1(_box_0); | 101 v0.Base$1(_box_0); |
102 v0.Sub$2(x, y); | 102 v0.Sub$2(x, y); |
103 return v0; | 103 return v0; |
104 }"""), | 104 }"""), |
105 | 105 |
106 const TestEntry.forMethod('generative_constructor(Sub#)', """ | 106 const TestEntry.forMethod('generative_constructor(Sub#)', """ |
107 foo(x) { | 107 foo(x) { |
108 print(x); | 108 print(x); |
109 } | 109 } |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after 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 |