Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: tests/compiler/dart2js/js_backend_cps_ir_constructor_test.dart

Issue 1417103002: Add ElementKind for factory constructors. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/semantic_visitor_test_decl_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698