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 test.src.task.driver_test; | 5 library test.src.task.driver_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/engine.dart' | 8 import 'package:analyzer/src/generated/engine.dart' |
9 show | 9 show |
10 AnalysisContext, | 10 AnalysisContext, |
11 CacheState, | 11 CacheState, |
12 InternalAnalysisContext, | 12 InternalAnalysisContext, |
13 RetentionPriority; | 13 RetentionPriority; |
14 import 'package:analyzer/src/generated/java_engine.dart'; | 14 import 'package:analyzer/src/generated/java_engine.dart'; |
15 import 'package:analyzer/src/generated/sdk_io.dart'; | 15 import 'package:analyzer/src/generated/sdk_io.dart'; |
16 import 'package:analyzer/src/generated/source.dart'; | 16 import 'package:analyzer/src/generated/source.dart'; |
17 import 'package:analyzer/src/generated/utilities_collection.dart'; | 17 import 'package:analyzer/src/generated/utilities_collection.dart'; |
18 import 'package:analyzer/src/task/model.dart'; | 18 import 'package:analyzer/src/task/model.dart'; |
19 import 'package:analyzer/task/model.dart'; | 19 import 'package:analyzer/task/model.dart'; |
20 import 'package:typed_mock/typed_mock.dart'; | 20 import 'package:typed_mock/typed_mock.dart'; |
21 import 'package:unittest/unittest.dart'; | 21 import 'package:unittest/unittest.dart'; |
22 | 22 |
23 import '../../generated/test_support.dart'; | 23 import '../../generated/test_support.dart'; |
24 import '../../reflective_tests.dart'; | 24 import '../../reflective_tests.dart'; |
| 25 import '../../utils.dart'; |
25 | 26 |
26 main() { | 27 main() { |
27 groupSep = ' | '; | 28 initializeTestEnvironment(); |
28 runReflectiveTests(AnalysisCacheTest); | 29 runReflectiveTests(AnalysisCacheTest); |
29 runReflectiveTests(CacheEntryTest); | 30 runReflectiveTests(CacheEntryTest); |
30 runReflectiveTests(CacheFlushManagerTest); | 31 runReflectiveTests(CacheFlushManagerTest); |
31 runReflectiveTests(SdkCachePartitionTest); | 32 runReflectiveTests(SdkCachePartitionTest); |
32 runReflectiveTests(UniversalCachePartitionTest); | 33 runReflectiveTests(UniversalCachePartitionTest); |
33 runReflectiveTests(ResultDataTest); | 34 runReflectiveTests(ResultDataTest); |
34 } | 35 } |
35 | 36 |
36 AnalysisCache createCache({AnalysisContext context, | 37 AnalysisCache createCache( |
| 38 {AnalysisContext context, |
37 RetentionPriority policy: RetentionPriority.LOW}) { | 39 RetentionPriority policy: RetentionPriority.LOW}) { |
38 CachePartition partition = new UniversalCachePartition(context); | 40 CachePartition partition = new UniversalCachePartition(context); |
39 return new AnalysisCache(<CachePartition>[partition]); | 41 return new AnalysisCache(<CachePartition>[partition]); |
40 } | 42 } |
41 | 43 |
42 class AbstractCacheTest { | 44 class AbstractCacheTest { |
43 InternalAnalysisContext context; | 45 InternalAnalysisContext context; |
44 AnalysisCache cache; | 46 AnalysisCache cache; |
45 | 47 |
46 void setUp() { | 48 void setUp() { |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1052 | 1054 |
1053 class _InternalAnalysisContextMock extends TypedMock | 1055 class _InternalAnalysisContextMock extends TypedMock |
1054 implements InternalAnalysisContext { | 1056 implements InternalAnalysisContext { |
1055 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 1057 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
1056 } | 1058 } |
1057 | 1059 |
1058 class _TestAnalysisTarget implements AnalysisTarget { | 1060 class _TestAnalysisTarget implements AnalysisTarget { |
1059 @override | 1061 @override |
1060 Source get source => null; | 1062 Source get source => null; |
1061 } | 1063 } |
OLD | NEW |