| 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 library analyzer.test.src.summary.summary_common; | 5 library analyzer.test.src.summary.summary_common; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 import 'package:analyzer/dart/ast/ast.dart'; | 8 import 'package:analyzer/dart/ast/ast.dart'; |
| 9 import 'package:analyzer/dart/element/element.dart'; | 9 import 'package:analyzer/dart/element/element.dart'; |
| 10 import 'package:analyzer/src/generated/engine.dart'; | 10 import 'package:analyzer/src/generated/engine.dart'; |
| (...skipping 3953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3964 { | 3964 { |
| 3965 UnlinkedVariable v3 = variables.singleWhere((v) => v.name == 'v3'); | 3965 UnlinkedVariable v3 = variables.singleWhere((v) => v.name == 'v3'); |
| 3966 _assertVariableVisible(code, v3, '{ // 1', '} // 4'); | 3966 _assertVariableVisible(code, v3, '{ // 1', '} // 4'); |
| 3967 expect(v3.type, isNull); | 3967 expect(v3.type, isNull); |
| 3968 } | 3968 } |
| 3969 } | 3969 } |
| 3970 | 3970 |
| 3971 test_executable_localVariables_inTopLevelGetter() { | 3971 test_executable_localVariables_inTopLevelGetter() { |
| 3972 String code = r''' | 3972 String code = r''' |
| 3973 get g { // 1 | 3973 get g { // 1 |
| 3974 int v; | 3974 int v; |
| 3975 f() {} | 3975 f() {} |
| 3976 } // 2 | 3976 } // 2 |
| 3977 '''; | 3977 '''; |
| 3978 UnlinkedExecutable executable = serializeExecutableText(code, 'g'); | 3978 UnlinkedExecutable executable = serializeExecutableText(code, 'g'); |
| 3979 { | 3979 { |
| 3980 List<UnlinkedExecutable> functions = executable.localFunctions; | 3980 List<UnlinkedExecutable> functions = executable.localFunctions; |
| 3981 expect(functions, hasLength(1)); | 3981 expect(functions, hasLength(1)); |
| 3982 UnlinkedExecutable f = functions.singleWhere((v) => v.name == 'f'); | 3982 UnlinkedExecutable f = functions.singleWhere((v) => v.name == 'f'); |
| 3983 _assertExecutableVisible(code, f, '{ // 1', '} // 2'); | 3983 _assertExecutableVisible(code, f, '{ // 1', '} // 2'); |
| 3984 } | 3984 } |
| 3985 { | 3985 { |
| (...skipping 2578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6564 final String absoluteUri; | 6564 final String absoluteUri; |
| 6565 final String relativeUri; | 6565 final String relativeUri; |
| 6566 final int numTypeParameters; | 6566 final int numTypeParameters; |
| 6567 | 6567 |
| 6568 _PrefixExpectation(this.kind, this.name, | 6568 _PrefixExpectation(this.kind, this.name, |
| 6569 {this.inLibraryDefiningUnit: false, | 6569 {this.inLibraryDefiningUnit: false, |
| 6570 this.absoluteUri, | 6570 this.absoluteUri, |
| 6571 this.relativeUri, | 6571 this.relativeUri, |
| 6572 this.numTypeParameters: 0}); | 6572 this.numTypeParameters: 0}); |
| 6573 } | 6573 } |
| OLD | NEW |