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, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |