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

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

Issue 2298913003: Pull in test_reflective_loader 0.0.4 and switch analyzer to it. (Closed)
Patch Set: Fixes for review comments. Created 4 years, 3 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/file_system/file_system.dart'; 7 import 'package:analyzer/file_system/file_system.dart';
8 import 'package:analyzer/file_system/memory_file_system.dart'; 8 import 'package:analyzer/file_system/memory_file_system.dart';
9 import 'package:analyzer/file_system/physical_file_system.dart'; 9 import 'package:analyzer/file_system/physical_file_system.dart';
10 import 'package:analyzer/source/package_map_resolver.dart'; 10 import 'package:analyzer/source/package_map_resolver.dart';
11 import 'package:analyzer/src/context/cache.dart'; 11 import 'package:analyzer/src/context/cache.dart';
12 import 'package:analyzer/src/dart/sdk/sdk.dart'; 12 import 'package:analyzer/src/dart/sdk/sdk.dart';
13 import 'package:analyzer/src/generated/engine.dart'; 13 import 'package:analyzer/src/generated/engine.dart';
14 import 'package:analyzer/src/generated/java_engine.dart'; 14 import 'package:analyzer/src/generated/java_engine.dart';
15 import 'package:analyzer/src/generated/source.dart'; 15 import 'package:analyzer/src/generated/source.dart';
16 import 'package:analyzer/src/generated/utilities_collection.dart'; 16 import 'package:analyzer/src/generated/utilities_collection.dart';
17 import 'package:analyzer/src/task/model.dart'; 17 import 'package:analyzer/src/task/model.dart';
18 import 'package:analyzer/task/model.dart'; 18 import 'package:analyzer/task/model.dart';
19 import 'package:test_reflective_loader/test_reflective_loader.dart';
19 import 'package:typed_mock/typed_mock.dart'; 20 import 'package:typed_mock/typed_mock.dart';
20 import 'package:unittest/unittest.dart'; 21 import 'package:unittest/unittest.dart';
21 22
22 import '../../generated/test_support.dart'; 23 import '../../generated/test_support.dart';
23 import '../../reflective_tests.dart';
24 import '../../utils.dart'; 24 import '../../utils.dart';
25 25
26 main() { 26 main() {
27 initializeTestEnvironment(); 27 initializeTestEnvironment();
28 runReflectiveTests(AnalysisCacheTest); 28 defineReflectiveTests(AnalysisCacheTest);
29 runReflectiveTests(CacheEntryTest); 29 defineReflectiveTests(CacheEntryTest);
30 runReflectiveTests(CacheFlushManagerTest); 30 defineReflectiveTests(CacheFlushManagerTest);
31 runReflectiveTests(SdkCachePartitionTest); 31 defineReflectiveTests(SdkCachePartitionTest);
32 runReflectiveTests(UniversalCachePartitionTest); 32 defineReflectiveTests(UniversalCachePartitionTest);
33 runReflectiveTests(ResultDataTest); 33 defineReflectiveTests(ResultDataTest);
34 } 34 }
35 35
36 AnalysisCache createCache({AnalysisContext context}) { 36 AnalysisCache createCache({AnalysisContext context}) {
37 CachePartition partition = new UniversalCachePartition(context); 37 CachePartition partition = new UniversalCachePartition(context);
38 return new AnalysisCache(<CachePartition>[partition]); 38 return new AnalysisCache(<CachePartition>[partition]);
39 } 39 }
40 40
41 class AbstractCacheTest { 41 class AbstractCacheTest {
42 InternalAnalysisContext context; 42 InternalAnalysisContext context;
43 AnalysisCache cache; 43 AnalysisCache cache;
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 } 1300 }
1301 return DeltaResult.INVALIDATE; 1301 return DeltaResult.INVALIDATE;
1302 } 1302 }
1303 } 1303 }
1304 1304
1305 class _TestAnalysisTarget implements AnalysisTarget { 1305 class _TestAnalysisTarget implements AnalysisTarget {
1306 final Source librarySource; 1306 final Source librarySource;
1307 final Source source; 1307 final Source source;
1308 _TestAnalysisTarget({this.librarySource, this.source}); 1308 _TestAnalysisTarget({this.librarySource, this.source});
1309 } 1309 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698