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

Side by Side Diff: pkg/analyzer/test/src/task/dart_work_manager_test.dart

Issue 1155473003: Don't schedule LIBRARY_ERRORS_READY for libraries that should not be analyzed. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/generated/engine_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) 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.src.task.dart_work_manager_test; 5 library test.src.task.dart_work_manager_test;
6 6
7 import 'package:analyzer/src/context/cache.dart'; 7 import 'package:analyzer/src/context/cache.dart';
8 import 'package:analyzer/src/generated/ast.dart'; 8 import 'package:analyzer/src/generated/ast.dart';
9 import 'package:analyzer/src/generated/engine.dart' 9 import 'package:analyzer/src/generated/engine.dart'
10 show 10 show
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 manager.resultsComputed( 499 manager.resultsComputed(
500 new LibrarySpecificUnit(source1, source2), {RESOLVED_UNIT: unit}); 500 new LibrarySpecificUnit(source1, source2), {RESOLVED_UNIT: unit});
501 ChangeNoticeImpl notice = context.getNotice(source2); 501 ChangeNoticeImpl notice = context.getNotice(source2);
502 expect(notice.parsedDartUnit, isNull); 502 expect(notice.parsedDartUnit, isNull);
503 expect(notice.resolvedDartUnit, unit); 503 expect(notice.resolvedDartUnit, unit);
504 expect(notice.lineInfo, lineInfo); 504 expect(notice.lineInfo, lineInfo);
505 } 505 }
506 506
507 void test_resultsComputed_sourceKind_isLibrary() { 507 void test_resultsComputed_sourceKind_isLibrary() {
508 manager.unknownSourceQueue.addAll([source1, source2, source3]); 508 manager.unknownSourceQueue.addAll([source1, source2, source3]);
509 when(context.shouldErrorsBeAnalyzed(source2, null)).thenReturn(true);
509 manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.LIBRARY}); 510 manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.LIBRARY});
510 expect_librarySourceQueue([source2]); 511 expect_librarySourceQueue([source2]);
511 expect_unknownSourceQueue([source1, source3]); 512 expect_unknownSourceQueue([source1, source3]);
512 } 513 }
513 514
514 void test_resultsComputed_sourceKind_isPart() { 515 void test_resultsComputed_sourceKind_isPart() {
515 manager.unknownSourceQueue.addAll([source1, source2, source3]); 516 manager.unknownSourceQueue.addAll([source1, source2, source3]);
516 manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.PART}); 517 manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.PART});
517 expect_librarySourceQueue([]); 518 expect_librarySourceQueue([]);
518 expect_unknownSourceQueue([source1, source3]); 519 expect_unknownSourceQueue([source1, source3]);
(...skipping 22 matching lines...) Expand all
541 } 542 }
542 543
543 @override 544 @override
544 ChangeNoticeImpl getNotice(Source source) { 545 ChangeNoticeImpl getNotice(Source source) {
545 return _pendingNotices.putIfAbsent( 546 return _pendingNotices.putIfAbsent(
546 source, () => new ChangeNoticeImpl(source)); 547 source, () => new ChangeNoticeImpl(source));
547 } 548 }
548 549
549 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 550 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
550 } 551 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/engine_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698