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'; |
11 import 'package:analyzer/source/package_map_resolver.dart'; | 11 import 'package:analyzer/source/package_map_resolver.dart'; |
12 import 'package:analyzer/src/context/cache.dart'; | 12 import 'package:analyzer/src/context/cache.dart'; |
13 import 'package:analyzer/src/dart/sdk/sdk.dart'; | 13 import 'package:analyzer/src/dart/sdk/sdk.dart'; |
14 import 'package:analyzer/src/generated/engine.dart'; | 14 import 'package:analyzer/src/generated/engine.dart'; |
15 import 'package:analyzer/src/generated/source.dart'; | 15 import 'package:analyzer/src/generated/source.dart'; |
16 import 'package:analyzer/src/generated/utilities_collection.dart'; | 16 import 'package:analyzer/src/generated/utilities_collection.dart'; |
17 import 'package:analyzer/src/task/model.dart'; | 17 import 'package:analyzer/src/task/model.dart'; |
18 import 'package:analyzer/task/model.dart'; | 18 import 'package:analyzer/task/model.dart'; |
| 19 import 'package:test/test.dart'; |
19 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 20 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
20 import 'package:typed_mock/typed_mock.dart'; | 21 import 'package:typed_mock/typed_mock.dart'; |
21 import 'package:unittest/unittest.dart'; | |
22 | 22 |
23 import '../../generated/test_support.dart'; | 23 import '../../generated/test_support.dart'; |
24 import '../../utils.dart'; | 24 import '../../utils.dart'; |
25 | 25 |
26 main() { | 26 main() { |
27 initializeTestEnvironment(); | 27 initializeTestEnvironment(); |
28 defineReflectiveTests(AnalysisCacheTest); | 28 defineReflectiveSuite(() { |
29 defineReflectiveTests(CacheEntryTest); | 29 defineReflectiveTests(AnalysisCacheTest); |
30 defineReflectiveTests(CacheFlushManagerTest); | 30 defineReflectiveTests(CacheEntryTest); |
31 defineReflectiveTests(SdkCachePartitionTest); | 31 defineReflectiveTests(CacheFlushManagerTest); |
32 defineReflectiveTests(UniversalCachePartitionTest); | 32 defineReflectiveTests(SdkCachePartitionTest); |
33 defineReflectiveTests(ResultDataTest); | 33 defineReflectiveTests(UniversalCachePartitionTest); |
| 34 defineReflectiveTests(ResultDataTest); |
| 35 }); |
34 } | 36 } |
35 | 37 |
36 AnalysisCache createCache({AnalysisContext context}) { | 38 AnalysisCache createCache({AnalysisContext context}) { |
37 CachePartition partition = new UniversalCachePartition(context); | 39 CachePartition partition = new UniversalCachePartition(context); |
38 return new AnalysisCache(<CachePartition>[partition]); | 40 return new AnalysisCache(<CachePartition>[partition]); |
39 } | 41 } |
40 | 42 |
41 class AbstractCacheTest { | 43 class AbstractCacheTest { |
42 InternalAnalysisContext context; | 44 InternalAnalysisContext context; |
43 AnalysisCache cache; | 45 AnalysisCache cache; |
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1321 } | 1323 } |
1322 return DeltaResult.INVALIDATE; | 1324 return DeltaResult.INVALIDATE; |
1323 } | 1325 } |
1324 } | 1326 } |
1325 | 1327 |
1326 class _TestAnalysisTarget implements AnalysisTarget { | 1328 class _TestAnalysisTarget implements AnalysisTarget { |
1327 final Source librarySource; | 1329 final Source librarySource; |
1328 final Source source; | 1330 final Source source; |
1329 _TestAnalysisTarget({this.librarySource, this.source}); | 1331 _TestAnalysisTarget({this.librarySource, this.source}); |
1330 } | 1332 } |
OLD | NEW |