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

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

Issue 1124113004: Get AnalysisCache from InternalAnalysisContext. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer/test/generated/engine_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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,
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 99
100 @reflectiveTest 100 @reflectiveTest
101 class CacheEntryTest extends EngineTestCase { 101 class CacheEntryTest extends EngineTestCase {
102 InternalAnalysisContext context; 102 InternalAnalysisContext context;
103 AnalysisCache cache; 103 AnalysisCache cache;
104 104
105 void setUp() { 105 void setUp() {
106 context = new _InternalAnalysisContextMock(); 106 context = new _InternalAnalysisContextMock();
107 when(context.priorityTargets).thenReturn([]); 107 when(context.priorityTargets).thenReturn([]);
108 cache = createCache(context: context); 108 cache = createCache(context: context);
109 // when(context.analysisCache).thenReturn(cache); 109 when(context.analysisCache).thenReturn(cache);
110 } 110 }
111 111
112 test_explicitlyAdded() { 112 test_explicitlyAdded() {
113 CacheEntry entry = new CacheEntry(); 113 CacheEntry entry = new CacheEntry();
114 expect(entry.explicitlyAdded, false); 114 expect(entry.explicitlyAdded, false);
115 entry.explicitlyAdded = true; 115 entry.explicitlyAdded = true;
116 expect(entry.explicitlyAdded, true); 116 expect(entry.explicitlyAdded, true);
117 } 117 }
118 118
119 test_fixExceptionState_error_exception() { 119 test_fixExceptionState_error_exception() {
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 UniversalCachePartition partition = new UniversalCachePartition(null); 745 UniversalCachePartition partition = new UniversalCachePartition(null);
746 TestSource source = new TestSource(); 746 TestSource source = new TestSource();
747 expect(partition.contains(source), isTrue); 747 expect(partition.contains(source), isTrue);
748 } 748 }
749 } 749 }
750 750
751 class _InternalAnalysisContextMock extends TypedMock 751 class _InternalAnalysisContextMock extends TypedMock
752 implements InternalAnalysisContext { 752 implements InternalAnalysisContext {
753 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 753 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
754 } 754 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/engine_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698