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

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

Issue 1266923004: More fixes for failures on the Windows bot (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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 | « pkg/analyzer/test/src/task/dart_test.dart ('k') | pkg/analyzer/test/src/task/driver_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 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 10 matching lines...) Expand all
21 import 'package:analyzer/src/task/dart_work_manager.dart'; 21 import 'package:analyzer/src/task/dart_work_manager.dart';
22 import 'package:analyzer/src/task/driver.dart'; 22 import 'package:analyzer/src/task/driver.dart';
23 import 'package:analyzer/task/dart.dart'; 23 import 'package:analyzer/task/dart.dart';
24 import 'package:analyzer/task/general.dart'; 24 import 'package:analyzer/task/general.dart';
25 import 'package:analyzer/task/model.dart'; 25 import 'package:analyzer/task/model.dart';
26 import 'package:typed_mock/typed_mock.dart'; 26 import 'package:typed_mock/typed_mock.dart';
27 import 'package:unittest/unittest.dart'; 27 import 'package:unittest/unittest.dart';
28 28
29 import '../../generated/test_support.dart'; 29 import '../../generated/test_support.dart';
30 import '../../reflective_tests.dart'; 30 import '../../reflective_tests.dart';
31 import '../../utils.dart';
31 32
32 main() { 33 main() {
33 groupSep = ' | '; 34 initializeTestEnvironment();
34 runReflectiveTests(DartWorkManagerTest); 35 runReflectiveTests(DartWorkManagerTest);
35 } 36 }
36 37
37 @reflectiveTest 38 @reflectiveTest
38 class DartWorkManagerTest { 39 class DartWorkManagerTest {
39 InternalAnalysisContext context = new _InternalAnalysisContextMock(); 40 InternalAnalysisContext context = new _InternalAnalysisContextMock();
40 AnalysisCache cache; 41 AnalysisCache cache;
41 DartWorkManager manager; 42 DartWorkManager manager;
42 43
43 CaughtException caughtException = new CaughtException(null, null); 44 CaughtException caughtException = new CaughtException(null, null);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 when(context.shouldErrorsBeAnalyzed(source3, null)).thenReturn(true); 213 when(context.shouldErrorsBeAnalyzed(source3, null)).thenReturn(true);
213 entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []); 214 entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
214 entry2.setValue(SOURCE_KIND, SourceKind.LIBRARY, []); 215 entry2.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
215 entry3.setValue(SOURCE_KIND, SourceKind.LIBRARY, []); 216 entry3.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
216 manager.priorityResultQueue 217 manager.priorityResultQueue
217 .add(new TargetedResult(source1, LIBRARY_ERRORS_READY)); 218 .add(new TargetedResult(source1, LIBRARY_ERRORS_READY));
218 manager.priorityResultQueue 219 manager.priorityResultQueue
219 .add(new TargetedResult(source2, LIBRARY_ERRORS_READY)); 220 .add(new TargetedResult(source2, LIBRARY_ERRORS_READY));
220 // -source1 +source3 221 // -source1 +source3
221 manager.applyPriorityTargets([source2, source3]); 222 manager.applyPriorityTargets([source2, source3]);
222 expect(manager.priorityResultQueue, unorderedEquals([ 223 expect(
223 new TargetedResult(source2, LIBRARY_ERRORS_READY), 224 manager.priorityResultQueue,
224 new TargetedResult(source3, LIBRARY_ERRORS_READY) 225 unorderedEquals([
225 ])); 226 new TargetedResult(source2, LIBRARY_ERRORS_READY),
227 new TargetedResult(source3, LIBRARY_ERRORS_READY)
228 ]));
226 // get next request 229 // get next request
227 TargetedResult request = manager.getNextResult(); 230 TargetedResult request = manager.getNextResult();
228 expect(request.target, source2); 231 expect(request.target, source2);
229 expect(request.result, LIBRARY_ERRORS_READY); 232 expect(request.result, LIBRARY_ERRORS_READY);
230 } 233 }
231 234
232 void test_applyPriorityTargets_isLibrary_computeUnit() { 235 void test_applyPriorityTargets_isLibrary_computeUnit() {
233 when(context.shouldErrorsBeAnalyzed(source2, null)).thenReturn(false); 236 when(context.shouldErrorsBeAnalyzed(source2, null)).thenReturn(false);
234 when(context.shouldErrorsBeAnalyzed(source3, null)).thenReturn(false); 237 when(context.shouldErrorsBeAnalyzed(source3, null)).thenReturn(false);
235 entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []); 238 entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
236 entry2.setValue(SOURCE_KIND, SourceKind.LIBRARY, []); 239 entry2.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
237 entry3.setValue(SOURCE_KIND, SourceKind.LIBRARY, []); 240 entry3.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
238 manager.priorityResultQueue 241 manager.priorityResultQueue
239 .add(new TargetedResult(source1, LIBRARY_ERRORS_READY)); 242 .add(new TargetedResult(source1, LIBRARY_ERRORS_READY));
240 manager.priorityResultQueue 243 manager.priorityResultQueue
241 .add(new TargetedResult(source2, LIBRARY_ERRORS_READY)); 244 .add(new TargetedResult(source2, LIBRARY_ERRORS_READY));
242 // -source1 +source3 245 // -source1 +source3
243 manager.applyPriorityTargets([source2, source3]); 246 manager.applyPriorityTargets([source2, source3]);
244 expect(manager.priorityResultQueue, unorderedEquals([ 247 expect(
245 new TargetedResult( 248 manager.priorityResultQueue,
246 new LibrarySpecificUnit(source2, source2), RESOLVED_UNIT), 249 unorderedEquals([
247 new TargetedResult( 250 new TargetedResult(
248 new LibrarySpecificUnit(source3, source3), RESOLVED_UNIT), 251 new LibrarySpecificUnit(source2, source2), RESOLVED_UNIT),
249 ])); 252 new TargetedResult(
253 new LibrarySpecificUnit(source3, source3), RESOLVED_UNIT),
254 ]));
250 } 255 }
251 256
252 void test_applyPriorityTargets_isPart() { 257 void test_applyPriorityTargets_isPart() {
253 entry1.setValue(SOURCE_KIND, SourceKind.PART, []); 258 entry1.setValue(SOURCE_KIND, SourceKind.PART, []);
254 entry2.setValue(SOURCE_KIND, SourceKind.LIBRARY, []); 259 entry2.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
255 entry3.setValue(SOURCE_KIND, SourceKind.LIBRARY, []); 260 entry3.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
256 // +source2 +source3 261 // +source2 +source3
257 when(context.getLibrariesContaining(source1)) 262 when(context.getLibrariesContaining(source1))
258 .thenReturn([source2, source3]); 263 .thenReturn([source2, source3]);
259 manager.applyPriorityTargets([source1]); 264 manager.applyPriorityTargets([source1]);
260 expect(manager.priorityResultQueue, unorderedEquals([ 265 expect(
261 new TargetedResult(source2, LIBRARY_ERRORS_READY), 266 manager.priorityResultQueue,
262 new TargetedResult(source3, LIBRARY_ERRORS_READY) 267 unorderedEquals([
263 ])); 268 new TargetedResult(source2, LIBRARY_ERRORS_READY),
269 new TargetedResult(source3, LIBRARY_ERRORS_READY)
270 ]));
264 // get next request 271 // get next request
265 TargetedResult request = manager.getNextResult(); 272 TargetedResult request = manager.getNextResult();
266 expect(request.target, source2); 273 expect(request.target, source2);
267 expect(request.result, LIBRARY_ERRORS_READY); 274 expect(request.result, LIBRARY_ERRORS_READY);
268 } 275 }
269 276
270 void test_applyPriorityTargets_isUnknown() { 277 void test_applyPriorityTargets_isUnknown() {
271 manager.applyPriorityTargets([source2, source3]); 278 manager.applyPriorityTargets([source2, source3]);
272 expect(manager.priorityResultQueue, unorderedEquals([ 279 expect(
273 new TargetedResult(source2, SOURCE_KIND), 280 manager.priorityResultQueue,
274 new TargetedResult(source3, SOURCE_KIND) 281 unorderedEquals([
275 ])); 282 new TargetedResult(source2, SOURCE_KIND),
283 new TargetedResult(source3, SOURCE_KIND)
284 ]));
276 // get next request 285 // get next request
277 TargetedResult request = manager.getNextResult(); 286 TargetedResult request = manager.getNextResult();
278 expect(request.target, source2); 287 expect(request.target, source2);
279 expect(request.result, SOURCE_KIND); 288 expect(request.result, SOURCE_KIND);
280 } 289 }
281 290
282 void test_getErrors() { 291 void test_getErrors() {
283 AnalysisError error1 = 292 AnalysisError error1 =
284 new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT); 293 new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT);
285 AnalysisError error2 = 294 AnalysisError error2 =
286 new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT); 295 new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
287 when(context.getLibrariesContaining(source1)).thenReturn([source2]); 296 when(context.getLibrariesContaining(source1)).thenReturn([source2]);
288 LineInfo lineInfo = new LineInfo([0]); 297 LineInfo lineInfo = new LineInfo([0]);
289 entry1.setValue(LINE_INFO, lineInfo, []); 298 entry1.setValue(LINE_INFO, lineInfo, []);
290 entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []); 299 entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []);
291 context.getCacheEntry(new LibrarySpecificUnit(source2, source1)).setValue( 300 context
292 VERIFY_ERRORS, <AnalysisError>[error2], []); 301 .getCacheEntry(new LibrarySpecificUnit(source2, source1))
302 .setValue(VERIFY_ERRORS, <AnalysisError>[error2], []);
293 AnalysisErrorInfo errorInfo = manager.getErrors(source1); 303 AnalysisErrorInfo errorInfo = manager.getErrors(source1);
294 expect(errorInfo.errors, unorderedEquals([error1, error2])); 304 expect(errorInfo.errors, unorderedEquals([error1, error2]));
295 expect(errorInfo.lineInfo, lineInfo); 305 expect(errorInfo.lineInfo, lineInfo);
296 } 306 }
297 307
298 void test_getErrors_hasFullList() { 308 void test_getErrors_hasFullList() {
299 AnalysisError error1 = 309 AnalysisError error1 =
300 new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT); 310 new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT);
301 AnalysisError error2 = 311 AnalysisError error2 =
302 new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT); 312 new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 TargetedResult request = manager.getNextResult(); 363 TargetedResult request = manager.getNextResult();
354 expect(request.target, source2); 364 expect(request.target, source2);
355 expect(request.result, LIBRARY_ERRORS_READY); 365 expect(request.result, LIBRARY_ERRORS_READY);
356 // source1 is out, source2 is waiting 366 // source1 is out, source2 is waiting
357 expect_librarySourceQueue([source2]); 367 expect_librarySourceQueue([source2]);
358 } 368 }
359 369
360 void test_getNextResult_hasPriority_firstIsError() { 370 void test_getNextResult_hasPriority_firstIsError() {
361 manager.addPriorityResult(source1, SOURCE_KIND); 371 manager.addPriorityResult(source1, SOURCE_KIND);
362 manager.addPriorityResult(source2, SOURCE_KIND); 372 manager.addPriorityResult(source2, SOURCE_KIND);
363 expect(manager.priorityResultQueue, unorderedEquals([ 373 expect(
364 new TargetedResult(source1, SOURCE_KIND), 374 manager.priorityResultQueue,
365 new TargetedResult(source2, SOURCE_KIND) 375 unorderedEquals([
366 ])); 376 new TargetedResult(source1, SOURCE_KIND),
377 new TargetedResult(source2, SOURCE_KIND)
378 ]));
367 // configure state and get next result 379 // configure state and get next result
368 entry1.setErrorState(caughtException, [SOURCE_KIND]); 380 entry1.setErrorState(caughtException, [SOURCE_KIND]);
369 TargetedResult request = manager.getNextResult(); 381 TargetedResult request = manager.getNextResult();
370 expect(request.target, source2); 382 expect(request.target, source2);
371 expect(request.result, SOURCE_KIND); 383 expect(request.result, SOURCE_KIND);
372 // source1 is out, source2 is waiting 384 // source1 is out, source2 is waiting
373 expect(manager.priorityResultQueue, 385 expect(manager.priorityResultQueue,
374 unorderedEquals([new TargetedResult(source2, SOURCE_KIND)])); 386 unorderedEquals([new TargetedResult(source2, SOURCE_KIND)]));
375 } 387 }
376 388
377 void test_getNextResult_hasPriority_firstIsValid() { 389 void test_getNextResult_hasPriority_firstIsValid() {
378 manager.addPriorityResult(source1, SOURCE_KIND); 390 manager.addPriorityResult(source1, SOURCE_KIND);
379 manager.addPriorityResult(source2, SOURCE_KIND); 391 manager.addPriorityResult(source2, SOURCE_KIND);
380 expect(manager.priorityResultQueue, unorderedEquals([ 392 expect(
381 new TargetedResult(source1, SOURCE_KIND), 393 manager.priorityResultQueue,
382 new TargetedResult(source2, SOURCE_KIND) 394 unorderedEquals([
383 ])); 395 new TargetedResult(source1, SOURCE_KIND),
396 new TargetedResult(source2, SOURCE_KIND)
397 ]));
384 // configure state and get next result 398 // configure state and get next result
385 entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []); 399 entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
386 TargetedResult request = manager.getNextResult(); 400 TargetedResult request = manager.getNextResult();
387 expect(request.target, source2); 401 expect(request.target, source2);
388 expect(request.result, SOURCE_KIND); 402 expect(request.result, SOURCE_KIND);
389 // source1 is out, source2 is waiting 403 // source1 is out, source2 is waiting
390 expect(manager.priorityResultQueue, 404 expect(manager.priorityResultQueue,
391 unorderedEquals([new TargetedResult(source2, SOURCE_KIND)])); 405 unorderedEquals([new TargetedResult(source2, SOURCE_KIND)]));
392 } 406 }
393 407
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 void test_resultsComputed_errors_forLibrarySpecificUnit() { 532 void test_resultsComputed_errors_forLibrarySpecificUnit() {
519 AnalysisError error1 = 533 AnalysisError error1 =
520 new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT); 534 new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT);
521 AnalysisError error2 = 535 AnalysisError error2 =
522 new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT); 536 new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
523 when(context.getLibrariesContaining(source1)).thenReturn([source2]); 537 when(context.getLibrariesContaining(source1)).thenReturn([source2]);
524 LineInfo lineInfo = new LineInfo([0]); 538 LineInfo lineInfo = new LineInfo([0]);
525 entry1.setValue(LINE_INFO, lineInfo, []); 539 entry1.setValue(LINE_INFO, lineInfo, []);
526 entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []); 540 entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []);
527 AnalysisTarget unitTarget = new LibrarySpecificUnit(source2, source1); 541 AnalysisTarget unitTarget = new LibrarySpecificUnit(source2, source1);
528 context.getCacheEntry(unitTarget).setValue( 542 context
529 VERIFY_ERRORS, <AnalysisError>[error2], []); 543 .getCacheEntry(unitTarget)
544 .setValue(VERIFY_ERRORS, <AnalysisError>[error2], []);
530 // RESOLVED_UNIT is ready, set errors 545 // RESOLVED_UNIT is ready, set errors
531 manager.resultsComputed( 546 manager.resultsComputed(
532 unitTarget, {RESOLVED_UNIT: AstFactory.compilationUnit()}); 547 unitTarget, {RESOLVED_UNIT: AstFactory.compilationUnit()});
533 // all of the errors are included 548 // all of the errors are included
534 ChangeNoticeImpl notice = context.getNotice(source1); 549 ChangeNoticeImpl notice = context.getNotice(source1);
535 expect(notice.errors, unorderedEquals([error1, error2])); 550 expect(notice.errors, unorderedEquals([error1, error2]));
536 expect(notice.lineInfo, lineInfo); 551 expect(notice.lineInfo, lineInfo);
537 } 552 }
538 553
539 void test_resultsComputed_errors_forSource() { 554 void test_resultsComputed_errors_forSource() {
(...skipping 17 matching lines...) Expand all
557 572
558 void test_resultsComputed_includedParts_updatePartLibraries() { 573 void test_resultsComputed_includedParts_updatePartLibraries() {
559 Source part1 = new TestSource('part1.dart'); 574 Source part1 = new TestSource('part1.dart');
560 Source part2 = new TestSource('part2.dart'); 575 Source part2 = new TestSource('part2.dart');
561 Source part3 = new TestSource('part3.dart'); 576 Source part3 = new TestSource('part3.dart');
562 Source library1 = new TestSource('library1.dart'); 577 Source library1 = new TestSource('library1.dart');
563 Source library2 = new TestSource('library2.dart'); 578 Source library2 = new TestSource('library2.dart');
564 _getOrCreateEntry(part1).setValue(CONTAINING_LIBRARIES, [], []); 579 _getOrCreateEntry(part1).setValue(CONTAINING_LIBRARIES, [], []);
565 expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.VALID); 580 expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.VALID);
566 // library1 parts 581 // library1 parts
567 manager.resultsComputed(library1, {INCLUDED_PARTS: [part1, part2]}); 582 manager.resultsComputed(library1, {
583 INCLUDED_PARTS: [part1, part2]
584 });
568 expect(manager.partLibrariesMap[part1], [library1]); 585 expect(manager.partLibrariesMap[part1], [library1]);
569 expect(manager.partLibrariesMap[part2], [library1]); 586 expect(manager.partLibrariesMap[part2], [library1]);
570 expect(manager.partLibrariesMap[part3], isNull); 587 expect(manager.partLibrariesMap[part3], isNull);
571 expect(manager.libraryPartsMap[library1], [part1, part2]); 588 expect(manager.libraryPartsMap[library1], [part1, part2]);
572 expect(manager.libraryPartsMap[library2], isNull); 589 expect(manager.libraryPartsMap[library2], isNull);
573 // library2 parts 590 // library2 parts
574 manager.resultsComputed(library2, {INCLUDED_PARTS: [part2, part3]}); 591 manager.resultsComputed(library2, {
592 INCLUDED_PARTS: [part2, part3]
593 });
575 expect(manager.partLibrariesMap[part1], [library1]); 594 expect(manager.partLibrariesMap[part1], [library1]);
576 expect(manager.partLibrariesMap[part2], [library1, library2]); 595 expect(manager.partLibrariesMap[part2], [library1, library2]);
577 expect(manager.partLibrariesMap[part3], [library2]); 596 expect(manager.partLibrariesMap[part3], [library2]);
578 expect(manager.libraryPartsMap[library1], [part1, part2]); 597 expect(manager.libraryPartsMap[library1], [part1, part2]);
579 expect(manager.libraryPartsMap[library2], [part2, part3]); 598 expect(manager.libraryPartsMap[library2], [part2, part3]);
580 // part1 CONTAINING_LIBRARIES 599 // part1 CONTAINING_LIBRARIES
581 expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.INVALID); 600 expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.INVALID);
582 } 601 }
583 602
584 void test_resultsComputed_noSourceKind() { 603 void test_resultsComputed_noSourceKind() {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 expect(manager.priorityResultQueue, 657 expect(manager.priorityResultQueue,
639 unorderedEquals([new TargetedResult(source2, LIBRARY_ERRORS_READY)])); 658 unorderedEquals([new TargetedResult(source2, LIBRARY_ERRORS_READY)]));
640 } 659 }
641 660
642 void test_resultsComputed_sourceKind_isLibrary_isPriority_computeUnit() { 661 void test_resultsComputed_sourceKind_isLibrary_isPriority_computeUnit() {
643 manager.unknownSourceQueue.addAll([source1, source2, source3]); 662 manager.unknownSourceQueue.addAll([source1, source2, source3]);
644 when(context.prioritySources).thenReturn(<Source>[source2]); 663 when(context.prioritySources).thenReturn(<Source>[source2]);
645 when(context.shouldErrorsBeAnalyzed(source2, null)).thenReturn(false); 664 when(context.shouldErrorsBeAnalyzed(source2, null)).thenReturn(false);
646 manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.LIBRARY}); 665 manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.LIBRARY});
647 expect_unknownSourceQueue([source1, source3]); 666 expect_unknownSourceQueue([source1, source3]);
648 expect(manager.priorityResultQueue, unorderedEquals([ 667 expect(
649 new TargetedResult( 668 manager.priorityResultQueue,
650 new LibrarySpecificUnit(source2, source2), RESOLVED_UNIT) 669 unorderedEquals([
651 ])); 670 new TargetedResult(
671 new LibrarySpecificUnit(source2, source2), RESOLVED_UNIT)
672 ]));
652 } 673 }
653 674
654 void test_resultsComputed_sourceKind_isPart() { 675 void test_resultsComputed_sourceKind_isPart() {
655 manager.unknownSourceQueue.addAll([source1, source2, source3]); 676 manager.unknownSourceQueue.addAll([source1, source2, source3]);
656 manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.PART}); 677 manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.PART});
657 expect_librarySourceQueue([]); 678 expect_librarySourceQueue([]);
658 expect_unknownSourceQueue([source1, source3]); 679 expect_unknownSourceQueue([source1, source3]);
659 } 680 }
660 681
661 CacheEntry _getOrCreateEntry(Source source) { 682 CacheEntry _getOrCreateEntry(Source source) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 } 715 }
695 716
696 @override 717 @override
697 ChangeNoticeImpl getNotice(Source source) { 718 ChangeNoticeImpl getNotice(Source source) {
698 return _pendingNotices.putIfAbsent( 719 return _pendingNotices.putIfAbsent(
699 source, () => new ChangeNoticeImpl(source)); 720 source, () => new ChangeNoticeImpl(source));
700 } 721 }
701 722
702 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 723 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
703 } 724 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/task/dart_test.dart ('k') | pkg/analyzer/test/src/task/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698