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

Side by Side Diff: pkg/analysis_server/test/analysis/update_content_test.dart

Issue 1203783004: Make use of test_flushAstStructures in analysis server. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix analyzer dependency, remove unused imports, rename method to match previous CL. Created 5 years, 6 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/analysis_server/pubspec.yaml ('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) 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 test.analysis.updateContent; 5 library test.analysis.updateContent;
6 6
7 import 'package:analysis_server/src/constants.dart'; 7 import 'package:analysis_server/src/constants.dart';
8 import 'package:analysis_server/src/protocol.dart'; 8 import 'package:analysis_server/src/protocol.dart';
9 import 'package:analysis_server/src/services/index/index.dart'; 9 import 'package:analysis_server/src/services/index/index.dart';
10 import 'package:analyzer/file_system/file_system.dart'; 10 import 'package:analyzer/file_system/file_system.dart';
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 test_sendNoticesAfterNopChange_flushedUnit() async { 198 test_sendNoticesAfterNopChange_flushedUnit() async {
199 createProject(); 199 createProject();
200 addTestFile(''); 200 addTestFile('');
201 await server.onAnalysisComplete; 201 await server.onAnalysisComplete;
202 // add an overlay 202 // add an overlay
203 server.updateContent( 203 server.updateContent(
204 '1', {testFile: new AddContentOverlay('main() {} main() {}')}); 204 '1', {testFile: new AddContentOverlay('main() {} main() {}')});
205 await server.onAnalysisComplete; 205 await server.onAnalysisComplete;
206 // clear errors and make a no-op change 206 // clear errors and make a no-op change
207 filesErrors.clear(); 207 filesErrors.clear();
208 server.test_flushResolvedUnit(testFile); 208 server.test_flushAstStructures(testFile);
209 server.updateContent('2', { 209 server.updateContent('2', {
210 testFile: new ChangeContentOverlay([new SourceEdit(0, 4, 'main')]) 210 testFile: new ChangeContentOverlay([new SourceEdit(0, 4, 'main')])
211 }); 211 });
212 await server.onAnalysisComplete; 212 await server.onAnalysisComplete;
213 // errors should have been resent 213 // errors should have been resent
214 expect(filesErrors, isNotEmpty); 214 expect(filesErrors, isNotEmpty);
215 } 215 }
216 216
217 List<Source> _getUserSources(AnalysisContext context) { 217 List<Source> _getUserSources(AnalysisContext context) {
218 List<Source> sources = <Source>[]; 218 List<Source> sources = <Source>[];
(...skipping 13 matching lines...) Expand all
232 232
233 @override 233 @override
234 bool matches(arg) { 234 bool matches(arg) {
235 return arg is CompilationUnit && arg.element.source.fullName == file; 235 return arg is CompilationUnit && arg.element.source.fullName == file;
236 } 236 }
237 } 237 }
238 238
239 class _MockIndex extends TypedMock implements Index { 239 class _MockIndex extends TypedMock implements Index {
240 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 240 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
241 } 241 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698