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

Side by Side Diff: pkg/analyzer/test/generated/incremental_resolver_test.dart

Issue 1668483003: Create ElementAnnotation objects prior to resolution. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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) 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.incremental_resolver_test; 5 library analyzer.test.generated.incremental_resolver_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/dart/element/element.dart'; 8 import 'package:analyzer/dart/element/element.dart';
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/dart/ast/utilities.dart'; 10 import 'package:analyzer/src/dart/ast/utilities.dart';
(...skipping 3076 matching lines...) Expand 10 before | Expand all | Expand 10 after
3087 void _assertMatchKind( 3087 void _assertMatchKind(
3088 DeclarationMatchKind expectMatch, String oldContent, String newContent) { 3088 DeclarationMatchKind expectMatch, String oldContent, String newContent) {
3089 Source source = addSource(oldContent); 3089 Source source = addSource(oldContent);
3090 LibraryElement library = resolve2(source); 3090 LibraryElement library = resolve2(source);
3091 CompilationUnit oldUnit = resolveCompilationUnit(source, library); 3091 CompilationUnit oldUnit = resolveCompilationUnit(source, library);
3092 // parse 3092 // parse
3093 CompilationUnit newUnit = IncrementalResolverTest._parseUnit(newContent); 3093 CompilationUnit newUnit = IncrementalResolverTest._parseUnit(newContent);
3094 // build elements 3094 // build elements
3095 { 3095 {
3096 ElementHolder holder = new ElementHolder(); 3096 ElementHolder holder = new ElementHolder();
3097 ElementBuilder builder = new ElementBuilder(holder); 3097 ElementBuilder builder = new ElementBuilder(holder, oldUnit.element);
3098 newUnit.accept(builder); 3098 newUnit.accept(builder);
3099 } 3099 }
3100 // match 3100 // match
3101 DeclarationMatcher matcher = new DeclarationMatcher(); 3101 DeclarationMatcher matcher = new DeclarationMatcher();
3102 DeclarationMatchKind matchKind = matcher.matches(newUnit, oldUnit.element); 3102 DeclarationMatchKind matchKind = matcher.matches(newUnit, oldUnit.element);
3103 expect(matchKind, same(expectMatch)); 3103 expect(matchKind, same(expectMatch));
3104 } 3104 }
3105 } 3105 }
3106 3106
3107 @reflectiveTest 3107 @reflectiveTest
(...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after
5175 @override 5175 @override
5176 void logException(Object exception, [Object stackTrace]) { 5176 void logException(Object exception, [Object stackTrace]) {
5177 hasError = true; 5177 hasError = true;
5178 } 5178 }
5179 5179
5180 @override 5180 @override
5181 logging.LoggingTimer startTimer() { 5181 logging.LoggingTimer startTimer() {
5182 return new logging.LoggingTimer(this); 5182 return new logging.LoggingTimer(this);
5183 } 5183 }
5184 } 5184 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/all_the_rest_test.dart ('k') | pkg/analyzer/test/generated/non_error_resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698