| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // Test that parameters keep their names in the output. | 4 // Test that parameters keep their names in the output. |
| 5 | 5 |
| 6 import "package:expect/expect.dart"; | 6 import "package:expect/expect.dart"; |
| 7 import "package:async_helper/async_helper.dart"; | 7 import "package:async_helper/async_helper.dart"; |
| 8 import 'memory_compiler.dart'; | 8 import 'memory_compiler.dart'; |
| 9 import '../../../sdk/lib/_internal/compiler/implementation/dump_info.dart'; | 9 import 'package:compiler/implementation/dump_info.dart'; |
| 10 | 10 |
| 11 const String TEST_ONE = r""" | 11 const String TEST_ONE = r""" |
| 12 library main; | 12 library main; |
| 13 | 13 |
| 14 int a = 2; | 14 int a = 2; |
| 15 | 15 |
| 16 class c { | 16 class c { |
| 17 final int m; | 17 final int m; |
| 18 c(this.m) { | 18 c(this.m) { |
| 19 () {} (); // TODO (sigurdm): Empty closure, hack to avoid inlining. | 19 () {} (); // TODO (sigurdm): Empty closure, hack to avoid inlining. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 var constructor = c.contents.singleWhere((e) => e.name == "c"); | 61 var constructor = c.contents.singleWhere((e) => e.name == "c"); |
| 62 Expect.stringEquals("constructor", constructor.kind); | 62 Expect.stringEquals("constructor", constructor.kind); |
| 63 var method = c.contents.singleWhere((e) => e.name == "foo"); | 63 var method = c.contents.singleWhere((e) => e.name == "foo"); |
| 64 Expect.stringEquals("method", method.kind); | 64 Expect.stringEquals("method", method.kind); |
| 65 var field = c.contents.singleWhere((e) => e.name == "m"); | 65 var field = c.contents.singleWhere((e) => e.name == "m"); |
| 66 Expect.stringEquals("field", field.kind); | 66 Expect.stringEquals("field", field.kind); |
| 67 Expect.stringEquals("function", f.kind); | 67 Expect.stringEquals("function", f.kind); |
| 68 Expect.stringEquals("function", main.kind); | 68 Expect.stringEquals("function", main.kind); |
| 69 })); | 69 })); |
| 70 } | 70 } |
| OLD | NEW |