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

Side by Side Diff: pkg/analyzer/lib/src/task/dart_work_manager.dart

Issue 2184243002: Add a couple of new tests for DartWorkManager. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | pkg/analyzer/test/src/task/dart_work_manager_test.dart » ('j') | 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 analyzer.src.task.dart_work_manager; 5 library analyzer.src.task.dart_work_manager;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 8
9 import 'package:analyzer/src/context/cache.dart'; 9 import 'package:analyzer/src/context/cache.dart';
10 import 'package:analyzer/src/generated/engine.dart' 10 import 'package:analyzer/src/generated/engine.dart'
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 shouldSetErrors = true; 344 shouldSetErrors = true;
345 } 345 }
346 }); 346 });
347 if (shouldSetErrors) { 347 if (shouldSetErrors) {
348 AnalysisErrorInfo info = context.getErrors(source); 348 AnalysisErrorInfo info = context.getErrors(source);
349 context.getNotice(source).setErrors(info.errors, info.lineInfo); 349 context.getNotice(source).setErrors(info.errors, info.lineInfo);
350 } 350 }
351 } 351 }
352 } 352 }
353 353
354 /**
355 * The given unit was incrementally resolved. Some of its error results might
356 * have been invalidated, so we schedule it for computing errors.
357 */
354 void unitIncrementallyResolved(Source librarySource, Source unitSource) { 358 void unitIncrementallyResolved(Source librarySource, Source unitSource) {
355 librarySourceQueue.add(librarySource); 359 librarySourceQueue.add(librarySource);
356 } 360 }
357 361
358 /** 362 /**
359 * Ask the [context]'s result provider for [CONTAINING_LIBRARIES]. 363 * Ask the [context]'s result provider for [CONTAINING_LIBRARIES].
360 * Return the list of containing libraries, or `null` if unknown. 364 * Return the list of containing libraries, or `null` if unknown.
361 */ 365 */
362 List<Source> _getLibrariesContainingPartFromResultProvider(Source part) { 366 List<Source> _getLibrariesContainingPartFromResultProvider(Source part) {
363 CacheEntry cacheEntry = context.getCacheEntry(part); 367 CacheEntry cacheEntry = context.getCacheEntry(part);
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 } 491 }
488 } 492 }
489 493
490 bool _shouldErrorsBeComputed(Source source) => 494 bool _shouldErrorsBeComputed(Source source) =>
491 context.shouldErrorsBeAnalyzed(source); 495 context.shouldErrorsBeAnalyzed(source);
492 496
493 static bool _isDartSource(AnalysisTarget target) { 497 static bool _isDartSource(AnalysisTarget target) {
494 return target is Source && AnalysisEngine.isDartFileName(target.fullName); 498 return target is Source && AnalysisEngine.isDartFileName(target.fullName);
495 } 499 }
496 } 500 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/dart_work_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698