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

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

Issue 2383203003: Add an analysis option to disable cache flushing. (Closed)
Patch Set: Created 4 years, 2 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/context/cache_test.dart ('k') | pkg/analyzer_cli/lib/src/driver.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.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/error/error.dart' show AnalysisError; 8 import 'package:analyzer/error/error.dart' show AnalysisError;
9 import 'package:analyzer/exception/exception.dart'; 9 import 'package:analyzer/exception/exception.dart';
10 import 'package:analyzer/src/context/cache.dart'; 10 import 'package:analyzer/src/context/cache.dart';
11 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode; 11 import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode;
12 import 'package:analyzer/src/generated/engine.dart' 12 import 'package:analyzer/src/generated/engine.dart'
13 show 13 show
14 AnalysisErrorInfoImpl, 14 AnalysisErrorInfoImpl,
15 AnalysisOptions,
16 AnalysisOptionsImpl,
15 CacheState, 17 CacheState,
16 ChangeNoticeImpl, 18 ChangeNoticeImpl,
17 InternalAnalysisContext; 19 InternalAnalysisContext;
18 import 'package:analyzer/src/generated/sdk.dart'; 20 import 'package:analyzer/src/generated/sdk.dart';
19 import 'package:analyzer/src/generated/source.dart'; 21 import 'package:analyzer/src/generated/source.dart';
20 import 'package:analyzer/src/generated/testing/ast_factory.dart'; 22 import 'package:analyzer/src/generated/testing/ast_factory.dart';
21 import 'package:analyzer/src/task/dart.dart'; 23 import 'package:analyzer/src/task/dart.dart';
22 import 'package:analyzer/src/task/dart_work_manager.dart'; 24 import 'package:analyzer/src/task/dart_work_manager.dart';
23 import 'package:analyzer/task/dart.dart'; 25 import 'package:analyzer/task/dart.dart';
24 import 'package:analyzer/task/general.dart'; 26 import 'package:analyzer/task/general.dart';
(...skipping 795 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 implements InternalAnalysisContext { 822 implements InternalAnalysisContext {
821 @override 823 @override
822 CachePartition privateAnalysisCachePartition; 824 CachePartition privateAnalysisCachePartition;
823 825
824 @override 826 @override
825 AnalysisCache analysisCache; 827 AnalysisCache analysisCache;
826 828
827 Map<Source, ChangeNoticeImpl> _pendingNotices = <Source, ChangeNoticeImpl>{}; 829 Map<Source, ChangeNoticeImpl> _pendingNotices = <Source, ChangeNoticeImpl>{};
828 830
829 @override 831 @override
832 final AnalysisOptions analysisOptions = new AnalysisOptionsImpl();
833
834 @override
830 final ReentrantSynchronousStream<InvalidatedResult> onResultInvalidated = 835 final ReentrantSynchronousStream<InvalidatedResult> onResultInvalidated =
831 new ReentrantSynchronousStream<InvalidatedResult>(); 836 new ReentrantSynchronousStream<InvalidatedResult>();
832 837
833 _InternalAnalysisContextMock() { 838 _InternalAnalysisContextMock() {
834 privateAnalysisCachePartition = new UniversalCachePartition(this); 839 privateAnalysisCachePartition = new UniversalCachePartition(this);
835 analysisCache = new AnalysisCache([privateAnalysisCachePartition]); 840 analysisCache = new AnalysisCache([privateAnalysisCachePartition]);
836 analysisCache.onResultInvalidated.listen((InvalidatedResult event) { 841 analysisCache.onResultInvalidated.listen((InvalidatedResult event) {
837 onResultInvalidated.add(event); 842 onResultInvalidated.add(event);
838 }); 843 });
839 } 844 }
(...skipping 18 matching lines...) Expand all
858 class _SourceFactoryMock extends TypedMock implements SourceFactory {} 863 class _SourceFactoryMock extends TypedMock implements SourceFactory {}
859 864
860 class _SourceMock extends TypedMock implements Source { 865 class _SourceMock extends TypedMock implements Source {
861 final String shortName; 866 final String shortName;
862 _SourceMock(this.shortName); 867 _SourceMock(this.shortName);
863 @override 868 @override
864 String get fullName => '/' + shortName; 869 String get fullName => '/' + shortName;
865 @override 870 @override
866 String toString() => fullName; 871 String toString() => fullName;
867 } 872 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/context/cache_test.dart ('k') | pkg/analyzer_cli/lib/src/driver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698