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

Unified Diff: pkg/analyzer/test/src/task/options_test.dart

Issue 2522543007: Remove uses of configuration data (Closed)
Patch Set: clean-up Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/src/context/context_test.dart ('k') | pkg/analyzer_cli/test/driver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/options_test.dart
diff --git a/pkg/analyzer/test/src/task/options_test.dart b/pkg/analyzer/test/src/task/options_test.dart
index 795b59f31f62ef480b64cd603abebb7f2fb2d2d7..b8f717a57b4f65e65888b05fd12d0d8d16b2a413 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -7,11 +7,8 @@ library analyzer.test.src.task.options_test;
import 'package:analyzer/analyzer.dart';
import 'package:analyzer/source/analysis_options_provider.dart';
import 'package:analyzer/source/error_processor.dart';
-import 'package:analyzer/src/context/context.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/task/options.dart'
- show CONFIGURED_ERROR_PROCESSORS;
import 'package:analyzer/src/task/options.dart';
import 'package:analyzer/task/general.dart';
import 'package:analyzer/task/model.dart';
@@ -90,8 +87,7 @@ analyzer:
unused_local_variable: error
''');
- List<ErrorProcessor> processors =
- context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
+ List<ErrorProcessor> processors = context.analysisOptions.errorProcessors;
expect(processors, hasLength(2));
var unused_local = new AnalysisError(
@@ -122,7 +118,7 @@ analyzer:
- 'test/**'
''');
- List<String> excludes = context.getConfigurationData(CONTEXT_EXCLUDES);
+ List<String> excludes = context.analysisOptions.excludePatterns;
expect(excludes, unorderedEquals(['foo/bar.dart', 'test/**']));
}
@@ -240,7 +236,9 @@ include: other_options.yaml
}
test_perform_include_bad_value() {
- newSource('/other_options.yaml', '''
+ newSource(
+ '/other_options.yaml',
+ '''
analyzer:
errors:
unused_local_variable: ftw
@@ -252,7 +250,7 @@ include: other_options.yaml
computeResult(target, ANALYSIS_OPTIONS_ERRORS);
expect(task, isGenerateOptionsErrorsTask);
List<AnalysisError> errors =
- outputs[ANALYSIS_OPTIONS_ERRORS] as List<AnalysisError>;
+ outputs[ANALYSIS_OPTIONS_ERRORS] as List<AnalysisError>;
expect(errors, hasLength(1));
AnalysisError error = errors[0];
expect(error.errorCode, AnalysisOptionsWarningCode.INCLUDED_FILE_WARNING);
@@ -271,7 +269,7 @@ include: other_options.yaml
computeResult(target, ANALYSIS_OPTIONS_ERRORS);
expect(task, isGenerateOptionsErrorsTask);
List<AnalysisError> errors =
- outputs[ANALYSIS_OPTIONS_ERRORS] as List<AnalysisError>;
+ outputs[ANALYSIS_OPTIONS_ERRORS] as List<AnalysisError>;
expect(errors, hasLength(1));
AnalysisError error = errors[0];
expect(error.errorCode, AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR);
« no previous file with comments | « pkg/analyzer/test/src/context/context_test.dart ('k') | pkg/analyzer_cli/test/driver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698