OLD | NEW |
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.context.cache_test; | 5 library analyzer.test.src.context.cache_test; |
6 | 6 |
7 import 'package:analyzer/exception/exception.dart'; | 7 import 'package:analyzer/exception/exception.dart'; |
8 import 'package:analyzer/file_system/file_system.dart'; | 8 import 'package:analyzer/file_system/file_system.dart'; |
9 import 'package:analyzer/file_system/memory_file_system.dart'; | 9 import 'package:analyzer/file_system/memory_file_system.dart'; |
10 import 'package:analyzer/file_system/physical_file_system.dart'; | 10 import 'package:analyzer/file_system/physical_file_system.dart'; |
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 // dispose | 1280 // dispose |
1281 partition2.dispose(); | 1281 partition2.dispose(); |
1282 expect(partition1.get(target1), same(entry1)); | 1282 expect(partition1.get(target1), same(entry1)); |
1283 expect(partition2.get(target2), isNull); | 1283 expect(partition2.get(target2), isNull); |
1284 // result2 is removed from result1 | 1284 // result2 is removed from result1 |
1285 expect(entry1.getResultData(descriptor1).dependentResults, isEmpty); | 1285 expect(entry1.getResultData(descriptor1).dependentResults, isEmpty); |
1286 } | 1286 } |
1287 } | 1287 } |
1288 | 1288 |
1289 class _InternalAnalysisContextMock extends TypedMock | 1289 class _InternalAnalysisContextMock extends TypedMock |
1290 implements InternalAnalysisContext {} | 1290 implements InternalAnalysisContext { |
| 1291 @override |
| 1292 final AnalysisOptions analysisOptions = new AnalysisOptionsImpl(); |
| 1293 } |
1291 | 1294 |
1292 /** | 1295 /** |
1293 * Keep the given [keepDescriptor], invalidate all the other results. | 1296 * Keep the given [keepDescriptor], invalidate all the other results. |
1294 */ | 1297 */ |
1295 class _KeepContinueDelta implements Delta { | 1298 class _KeepContinueDelta implements Delta { |
1296 final Source source; | 1299 final Source source; |
1297 final ResultDescriptor keepDescriptor; | 1300 final ResultDescriptor keepDescriptor; |
1298 | 1301 |
1299 _KeepContinueDelta(this.source, this.keepDescriptor); | 1302 _KeepContinueDelta(this.source, this.keepDescriptor); |
1300 | 1303 |
(...skipping 17 matching lines...) Expand all Loading... |
1318 } | 1321 } |
1319 return DeltaResult.INVALIDATE; | 1322 return DeltaResult.INVALIDATE; |
1320 } | 1323 } |
1321 } | 1324 } |
1322 | 1325 |
1323 class _TestAnalysisTarget implements AnalysisTarget { | 1326 class _TestAnalysisTarget implements AnalysisTarget { |
1324 final Source librarySource; | 1327 final Source librarySource; |
1325 final Source source; | 1328 final Source source; |
1326 _TestAnalysisTarget({this.librarySource, this.source}); | 1329 _TestAnalysisTarget({this.librarySource, this.source}); |
1327 } | 1330 } |
OLD | NEW |