| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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.generated.resolver_test; | 5 library analyzer.test.generated.resolver_test; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/dart/ast/ast.dart'; | 9 import 'package:analyzer/dart/ast/ast.dart'; |
| 10 import 'package:analyzer/dart/ast/visitor.dart'; | 10 import 'package:analyzer/dart/ast/visitor.dart'; |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 ConstTopLevelVariableElementImpl deprecatedTopLevelVariableElt = | 162 ConstTopLevelVariableElementImpl deprecatedTopLevelVariableElt = |
| 163 ElementFactory.topLevelVariableElement3( | 163 ElementFactory.topLevelVariableElement3( |
| 164 "deprecated", true, false, provider.deprecatedType); | 164 "deprecated", true, false, provider.deprecatedType); |
| 165 { | 165 { |
| 166 ClassElement deprecatedElement = provider.deprecatedType.element; | 166 ClassElement deprecatedElement = provider.deprecatedType.element; |
| 167 InstanceCreationExpression initializer = AstFactory | 167 InstanceCreationExpression initializer = AstFactory |
| 168 .instanceCreationExpression2( | 168 .instanceCreationExpression2( |
| 169 Keyword.CONST, | 169 Keyword.CONST, |
| 170 AstFactory.typeName(deprecatedElement), | 170 AstFactory.typeName(deprecatedElement), |
| 171 [AstFactory.string2('next release')]); | 171 [AstFactory.string2('next release')]); |
| 172 initializer.staticElement = deprecatedElement.constructors.single; | 172 ConstructorElement constructor = deprecatedElement.constructors.single; |
| 173 initializer.staticElement = constructor; |
| 174 initializer.constructorName.staticElement = constructor; |
| 173 deprecatedTopLevelVariableElt.constantInitializer = initializer; | 175 deprecatedTopLevelVariableElt.constantInitializer = initializer; |
| 174 } | 176 } |
| 175 coreUnit.accessors = <PropertyAccessorElement>[ | 177 coreUnit.accessors = <PropertyAccessorElement>[ |
| 176 proxyTopLevelVariableElt.getter, | 178 proxyTopLevelVariableElt.getter, |
| 177 deprecatedTopLevelVariableElt.getter | 179 deprecatedTopLevelVariableElt.getter |
| 178 ]; | 180 ]; |
| 179 coreUnit.topLevelVariables = <TopLevelVariableElement>[ | 181 coreUnit.topLevelVariables = <TopLevelVariableElement>[ |
| 180 proxyTopLevelVariableElt, | 182 proxyTopLevelVariableElt, |
| 181 deprecatedTopLevelVariableElt | 183 deprecatedTopLevelVariableElt |
| 182 ]; | 184 ]; |
| (...skipping 16720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16903 | 16905 |
| 16904 void _resolveTestUnit(String code) { | 16906 void _resolveTestUnit(String code) { |
| 16905 testCode = code; | 16907 testCode = code; |
| 16906 testSource = addSource(testCode); | 16908 testSource = addSource(testCode); |
| 16907 LibraryElement library = resolve2(testSource); | 16909 LibraryElement library = resolve2(testSource); |
| 16908 assertNoErrors(testSource); | 16910 assertNoErrors(testSource); |
| 16909 verify([testSource]); | 16911 verify([testSource]); |
| 16910 testUnit = resolveCompilationUnit(testSource, library); | 16912 testUnit = resolveCompilationUnit(testSource, library); |
| 16911 } | 16913 } |
| 16912 } | 16914 } |
| OLD | NEW |