| 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 analyzer.test.src.task.options_work_manager_test; | 5 library analyzer.test.src.task.options_work_manager_test; |
| 6 | 6 |
| 7 import 'package:analyzer/error/error.dart' show AnalysisError; | 7 import 'package:analyzer/error/error.dart' show AnalysisError; |
| 8 import 'package:analyzer/exception/exception.dart'; | 8 import 'package:analyzer/exception/exception.dart'; |
| 9 import 'package:analyzer/src/context/cache.dart'; | 9 import 'package:analyzer/src/context/cache.dart'; |
| 10 import 'package:analyzer/src/error/codes.dart' show AnalysisOptionsErrorCode; | 10 import 'package:analyzer/src/error/codes.dart' show AnalysisOptionsErrorCode; |
| 11 import 'package:analyzer/src/generated/engine.dart' | 11 import 'package:analyzer/src/generated/engine.dart' |
| 12 show | 12 show |
| 13 AnalysisEngine, | 13 AnalysisEngine, |
| 14 AnalysisErrorInfo, | 14 AnalysisErrorInfo, |
| 15 AnalysisErrorInfoImpl, | 15 AnalysisErrorInfoImpl, |
| 16 CacheState, | 16 CacheState, |
| 17 ChangeNoticeImpl, | 17 ChangeNoticeImpl, |
| 18 InternalAnalysisContext; | 18 InternalAnalysisContext; |
| 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/test.dart'; | 25 import 'package:test/test.dart'; |
| 26 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 26 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 27 import 'package:typed_mock/typed_mock.dart'; | 27 import 'package:typed_mock/typed_mock.dart'; |
| 28 | 28 |
| 29 import '../../generated/test_support.dart'; | 29 import '../../generated/test_support.dart'; |
| 30 import '../../utils.dart'; | |
| 31 | 30 |
| 32 main() { | 31 main() { |
| 33 initializeTestEnvironment(); | |
| 34 defineReflectiveSuite(() { | 32 defineReflectiveSuite(() { |
| 35 defineReflectiveTests(OptionsWorkManagerNewFileTest); | 33 defineReflectiveTests(OptionsWorkManagerNewFileTest); |
| 36 defineReflectiveTests(OptionsWorkManagerOldFileTest); | 34 defineReflectiveTests(OptionsWorkManagerOldFileTest); |
| 37 }); | 35 }); |
| 38 } | 36 } |
| 39 | 37 |
| 40 @reflectiveTest | 38 @reflectiveTest |
| 41 class OptionsWorkManagerNewFileTest extends OptionsWorkManagerTest { | 39 class OptionsWorkManagerNewFileTest extends OptionsWorkManagerTest { |
| 42 String get optionsFile => AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE; | 40 String get optionsFile => AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE; |
| 43 } | 41 } |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 errors = getCacheEntry(source).getValue(ANALYSIS_OPTIONS_ERRORS); | 290 errors = getCacheEntry(source).getValue(ANALYSIS_OPTIONS_ERRORS); |
| 293 } | 291 } |
| 294 return new AnalysisErrorInfoImpl( | 292 return new AnalysisErrorInfoImpl( |
| 295 errors, getCacheEntry(source).getValue(LINE_INFO)); | 293 errors, getCacheEntry(source).getValue(LINE_INFO)); |
| 296 } | 294 } |
| 297 | 295 |
| 298 @override | 296 @override |
| 299 ChangeNoticeImpl getNotice(Source source) => | 297 ChangeNoticeImpl getNotice(Source source) => |
| 300 _pendingNotices.putIfAbsent(source, () => new ChangeNoticeImpl(source)); | 298 _pendingNotices.putIfAbsent(source, () => new ChangeNoticeImpl(source)); |
| 301 } | 299 } |
| OLD | NEW |