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

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

Issue 1490233007: Remove the old task model (Closed) Base URL: https://github.com/dart-lang/sdk.git@analyzer-breaking-0.27
Patch Set: Created 5 years 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 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
10 AnalysisContext,
11 CacheState,
12 InternalAnalysisContext,
13 RetentionPriority;
14 import 'package:analyzer/src/generated/java_engine.dart'; 9 import 'package:analyzer/src/generated/java_engine.dart';
15 import 'package:analyzer/src/generated/sdk_io.dart'; 10 import 'package:analyzer/src/generated/sdk_io.dart';
16 import 'package:analyzer/src/generated/source.dart'; 11 import 'package:analyzer/src/generated/source.dart';
17 import 'package:analyzer/src/generated/utilities_collection.dart'; 12 import 'package:analyzer/src/generated/utilities_collection.dart';
18 import 'package:analyzer/src/task/model.dart'; 13 import 'package:analyzer/src/task/model.dart';
19 import 'package:analyzer/task/model.dart'; 14 import 'package:analyzer/task/model.dart';
20 import 'package:typed_mock/typed_mock.dart'; 15 import 'package:typed_mock/typed_mock.dart';
21 import 'package:unittest/unittest.dart'; 16 import 'package:unittest/unittest.dart';
22 17
23 import '../../generated/test_support.dart'; 18 import '../../generated/test_support.dart';
24 import '../../reflective_tests.dart'; 19 import '../../reflective_tests.dart';
25 import '../../utils.dart'; 20 import '../../utils.dart';
26 21
27 main() { 22 main() {
28 initializeTestEnvironment(); 23 initializeTestEnvironment();
29 runReflectiveTests(AnalysisCacheTest); 24 runReflectiveTests(AnalysisCacheTest);
30 runReflectiveTests(CacheEntryTest); 25 runReflectiveTests(CacheEntryTest);
31 runReflectiveTests(CacheFlushManagerTest); 26 runReflectiveTests(CacheFlushManagerTest);
32 runReflectiveTests(SdkCachePartitionTest); 27 runReflectiveTests(SdkCachePartitionTest);
33 runReflectiveTests(UniversalCachePartitionTest); 28 runReflectiveTests(UniversalCachePartitionTest);
34 runReflectiveTests(ResultDataTest); 29 runReflectiveTests(ResultDataTest);
35 } 30 }
36 31
37 AnalysisCache createCache( 32 AnalysisCache createCache({AnalysisContext context}) {
38 {AnalysisContext context,
39 RetentionPriority policy: RetentionPriority.LOW}) {
40 CachePartition partition = new UniversalCachePartition(context); 33 CachePartition partition = new UniversalCachePartition(context);
41 return new AnalysisCache(<CachePartition>[partition]); 34 return new AnalysisCache(<CachePartition>[partition]);
42 } 35 }
43 36
44 class AbstractCacheTest { 37 class AbstractCacheTest {
45 InternalAnalysisContext context; 38 InternalAnalysisContext context;
46 AnalysisCache cache; 39 AnalysisCache cache;
47 40
48 void setUp() { 41 void setUp() {
49 context = new _InternalAnalysisContextMock(); 42 context = new _InternalAnalysisContextMock();
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 return DeltaResult.KEEP_CONTINUE; 1134 return DeltaResult.KEEP_CONTINUE;
1142 } 1135 }
1143 return DeltaResult.INVALIDATE; 1136 return DeltaResult.INVALIDATE;
1144 } 1137 }
1145 } 1138 }
1146 1139
1147 class _TestAnalysisTarget implements AnalysisTarget { 1140 class _TestAnalysisTarget implements AnalysisTarget {
1148 @override 1141 @override
1149 Source get source => null; 1142 Source get source => null;
1150 } 1143 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/context/abstract_context.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