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

Side by Side Diff: pkg/analyzer/test/src/context/cache_test.dart

Issue 2151373002: Share LibrarySpecificUnits when possible (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Clean-up Created 4 years, 5 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
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.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
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
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 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/engine_test.dart ('k') | pkg/analyzer/test/src/context/context_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698