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

Side by Side Diff: pkg/analyzer/test/src/dart/constant/utilities_test.dart

Issue 2154083002: Remove ConstantFinder constructor parameters. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « pkg/analyzer/test/src/dart/constant/evaluation_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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.dart.constant.utilities_test; 5 library analyzer.test.src.dart.constant.utilities_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/ast/token.dart'; 8 import 'package:analyzer/dart/ast/token.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/src/dart/ast/token.dart'; 10 import 'package:analyzer/src/dart/ast/token.dart';
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 if (target is ElementAnnotationImpl) { 176 if (target is ElementAnnotationImpl) {
177 expect(target.context, same(_context)); 177 expect(target.context, same(_context));
178 expect(target.source, same(_source)); 178 expect(target.source, same(_source));
179 annotations.add(target.annotationAst); 179 annotations.add(target.annotationAst);
180 } 180 }
181 } 181 }
182 return new List<Annotation>.from(annotations); 182 return new List<Annotation>.from(annotations);
183 } 183 }
184 184
185 List<ConstantEvaluationTarget> _findConstants() { 185 List<ConstantEvaluationTarget> _findConstants() {
186 ConstantFinder finder = new ConstantFinder(_context, _source, _source); 186 ConstantFinder finder = new ConstantFinder();
187 _node.accept(finder); 187 _node.accept(finder);
188 List<ConstantEvaluationTarget> constants = finder.constantsToCompute; 188 List<ConstantEvaluationTarget> constants = finder.constantsToCompute;
189 expect(constants, isNotNull); 189 expect(constants, isNotNull);
190 return constants; 190 return constants;
191 } 191 }
192 192
193 ConstructorElement _setupConstructorDeclaration(String name, bool isConst) { 193 ConstructorElement _setupConstructorDeclaration(String name, bool isConst) {
194 Keyword constKeyword = isConst ? Keyword.CONST : null; 194 Keyword constKeyword = isConst ? Keyword.CONST : null;
195 ConstructorDeclaration constructorDeclaration = 195 ConstructorDeclaration constructorDeclaration =
196 AstFactory.constructorDeclaration2( 196 AstFactory.constructorDeclaration2(
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 void _visitNode(AstNode node) { 355 void _visitNode(AstNode node) {
356 node.accept(_createReferenceFinder(_head)); 356 node.accept(_createReferenceFinder(_head));
357 } 357 }
358 } 358 }
359 359
360 class _TestAnalysisContext extends TestAnalysisContext { 360 class _TestAnalysisContext extends TestAnalysisContext {
361 @override 361 @override
362 InternalAnalysisContext getContextFor(Source source) => this; 362 InternalAnalysisContext getContextFor(Source source) => this;
363 } 363 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/dart/constant/evaluation_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698