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

Side by Side Diff: pkg/analyzer/test/src/task/options_work_manager_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.task.options_work_manager_test; 5 library analyzer.test.src.task.options_work_manager_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 AnalysisEngine, 10 AnalysisEngine,
11 AnalysisErrorInfo, 11 AnalysisErrorInfo,
12 AnalysisErrorInfoImpl, 12 AnalysisErrorInfoImpl,
13 CacheState, 13 CacheState,
14 ChangeNoticeImpl, 14 ChangeNoticeImpl,
15 InternalAnalysisContext; 15 InternalAnalysisContext;
16 import 'package:analyzer/src/generated/error.dart' 16 import 'package:analyzer/src/generated/error.dart'
17 show AnalysisError, AnalysisOptionsErrorCode; 17 show AnalysisError, AnalysisOptionsErrorCode;
18 import 'package:analyzer/src/generated/java_engine.dart'; 18 import 'package:analyzer/src/generated/java_engine.dart';
19 import 'package:analyzer/src/generated/source.dart'; 19 import 'package:analyzer/src/generated/source.dart';
20 import 'package:analyzer/src/task/options.dart'; 20 import 'package:analyzer/src/task/options.dart';
21 import 'package:analyzer/src/task/options_work_manager.dart'; 21 import 'package:analyzer/src/task/options_work_manager.dart';
22 import 'package:analyzer/task/dart.dart'; 22 import 'package:analyzer/task/dart.dart';
23 import 'package:analyzer/task/general.dart'; 23 import 'package:analyzer/task/general.dart';
24 import 'package:analyzer/task/model.dart'; 24 import 'package:analyzer/task/model.dart';
25 import 'package:test_reflective_loader/test_reflective_loader.dart';
25 import 'package:typed_mock/typed_mock.dart'; 26 import 'package:typed_mock/typed_mock.dart';
26 import 'package:unittest/unittest.dart'; 27 import 'package:unittest/unittest.dart';
27 28
28 import '../../generated/test_support.dart'; 29 import '../../generated/test_support.dart';
29 import '../../reflective_tests.dart';
30 import '../../utils.dart'; 30 import '../../utils.dart';
31 31
32 main() { 32 main() {
33 initializeTestEnvironment(); 33 initializeTestEnvironment();
34 runReflectiveTests(OptionsWorkManagerNewFileTest); 34 defineReflectiveTests(OptionsWorkManagerNewFileTest);
35 runReflectiveTests(OptionsWorkManagerOldFileTest); 35 defineReflectiveTests(OptionsWorkManagerOldFileTest);
36 } 36 }
37 37
38 @reflectiveTest 38 @reflectiveTest
39 class OptionsWorkManagerNewFileTest extends OptionsWorkManagerTest { 39 class OptionsWorkManagerNewFileTest extends OptionsWorkManagerTest {
40 String get optionsFile => AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE; 40 String get optionsFile => AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE;
41 } 41 }
42 42
43 @reflectiveTest 43 @reflectiveTest
44 class OptionsWorkManagerOldFileTest extends OptionsWorkManagerTest { 44 class OptionsWorkManagerOldFileTest extends OptionsWorkManagerTest {
45 String get optionsFile => AnalysisEngine.ANALYSIS_OPTIONS_FILE; 45 String get optionsFile => AnalysisEngine.ANALYSIS_OPTIONS_FILE;
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 errors = getCacheEntry(source).getValue(ANALYSIS_OPTIONS_ERRORS); 290 errors = getCacheEntry(source).getValue(ANALYSIS_OPTIONS_ERRORS);
291 } 291 }
292 return new AnalysisErrorInfoImpl( 292 return new AnalysisErrorInfoImpl(
293 errors, getCacheEntry(source).getValue(LINE_INFO)); 293 errors, getCacheEntry(source).getValue(LINE_INFO));
294 } 294 }
295 295
296 @override 296 @override
297 ChangeNoticeImpl getNotice(Source source) => 297 ChangeNoticeImpl getNotice(Source source) =>
298 _pendingNotices.putIfAbsent(source, () => new ChangeNoticeImpl(source)); 298 _pendingNotices.putIfAbsent(source, () => new ChangeNoticeImpl(source));
299 } 299 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698