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

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

Issue 2151373002: Share LibrarySpecificUnits when possible (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Clean-up Created 4 years, 5 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) 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.test.src.task.dart_work_manager_test; 5 library analyzer.test.src.task.dart_work_manager_test;
6 6
7 import 'package:analyzer/dart/ast/ast.dart'; 7 import 'package:analyzer/dart/ast/ast.dart';
8 import 'package:analyzer/src/context/cache.dart'; 8 import 'package:analyzer/src/context/cache.dart';
9 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode; 9 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode;
10 import 'package:analyzer/src/generated/engine.dart' 10 import 'package:analyzer/src/generated/engine.dart'
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 expect(manager.unknownSourceQueue, unorderedEquals(sources)); 60 expect(manager.unknownSourceQueue, unorderedEquals(sources));
61 } 61 }
62 62
63 void setUp() { 63 void setUp() {
64 cache = context.analysisCache; 64 cache = context.analysisCache;
65 manager = new DartWorkManager(context); 65 manager = new DartWorkManager(context);
66 entry1 = _getOrCreateEntry(source1); 66 entry1 = _getOrCreateEntry(source1);
67 entry2 = _getOrCreateEntry(source2); 67 entry2 = _getOrCreateEntry(source2);
68 entry3 = _getOrCreateEntry(source3); 68 entry3 = _getOrCreateEntry(source3);
69 entry4 = _getOrCreateEntry(source4); 69 entry4 = _getOrCreateEntry(source4);
70 when(context.canonicalizeTarget(anyObject)).thenInvoke((target) => target);
70 } 71 }
71 72
72 void test_applyChange_add() { 73 void test_applyChange_add() {
73 // add source1 74 // add source1
74 manager.applyChange([source1], [], []); 75 manager.applyChange([source1], [], []);
75 expect_unknownSourceQueue([source1]); 76 expect_unknownSourceQueue([source1]);
76 expect_librarySourceQueue([]); 77 expect_librarySourceQueue([]);
77 // add source2 78 // add source2
78 manager.applyChange([source2], [], []); 79 manager.applyChange([source2], [], []);
79 expect_librarySourceQueue([]); 80 expect_librarySourceQueue([]);
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 class _SourceFactoryMock extends TypedMock implements SourceFactory {} 807 class _SourceFactoryMock extends TypedMock implements SourceFactory {}
807 808
808 class _SourceMock extends TypedMock implements Source { 809 class _SourceMock extends TypedMock implements Source {
809 final String shortName; 810 final String shortName;
810 _SourceMock(this.shortName); 811 _SourceMock(this.shortName);
811 @override 812 @override
812 String get fullName => '/' + shortName; 813 String get fullName => '/' + shortName;
813 @override 814 @override
814 String toString() => fullName; 815 String toString() => fullName;
815 } 816 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/context/context_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