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/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 import 'package:analyzer/src/generated/java_engine.dart'; | 9 import 'package:analyzer/src/generated/java_engine.dart'; |
10 import 'package:analyzer/src/generated/sdk_io.dart'; | 10 import 'package:analyzer/src/generated/sdk_io.dart'; |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 class AbstractCacheTest { | 37 class AbstractCacheTest { |
38 InternalAnalysisContext context; | 38 InternalAnalysisContext context; |
39 AnalysisCache cache; | 39 AnalysisCache cache; |
40 | 40 |
41 void setUp() { | 41 void setUp() { |
42 context = new _InternalAnalysisContextMock(); | 42 context = new _InternalAnalysisContextMock(); |
43 when(context.priorityTargets).thenReturn([]); | 43 when(context.priorityTargets).thenReturn([]); |
44 cache = createCache(context: context); | 44 cache = createCache(context: context); |
45 when(context.analysisCache).thenReturn(cache); | 45 when(context.analysisCache).thenReturn(cache); |
| 46 when(context.canonicalizeTarget(anyObject)).thenInvoke((target) => target); |
46 } | 47 } |
47 } | 48 } |
48 | 49 |
49 @reflectiveTest | 50 @reflectiveTest |
50 class AnalysisCacheTest extends AbstractCacheTest { | 51 class AnalysisCacheTest extends AbstractCacheTest { |
51 void test_creation() { | 52 void test_creation() { |
52 expect(cache, isNotNull); | 53 expect(cache, isNotNull); |
53 } | 54 } |
54 | 55 |
55 test_flush() { | 56 test_flush() { |
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 } | 1187 } |
1187 } | 1188 } |
1188 | 1189 |
1189 class _TestAnalysisTarget implements AnalysisTarget { | 1190 class _TestAnalysisTarget implements AnalysisTarget { |
1190 @override | 1191 @override |
1191 Source get librarySource => null; | 1192 Source get librarySource => null; |
1192 | 1193 |
1193 @override | 1194 @override |
1194 Source get source => null; | 1195 Source get source => null; |
1195 } | 1196 } |
OLD | NEW |