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

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

Issue 1842363004: More strong mode fixes for analyzer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Backout options changes Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
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 77e299088d7cfca6bf4f9ecb889ad3f2423f626d..4288f1597f1c908add65aa0bb350ec6246aa5463 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -114,7 +114,8 @@ analyzer:
''');
List<ErrorProcessor> processors =
- context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
+ context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS)
+ as List<ErrorProcessor>;
expect(processors, hasLength(2));
var unused_local = new AnalysisError(
@@ -222,7 +223,8 @@ class GenerateOptionsErrorsTaskTest extends AbstractContextTest {
AnalysisTarget target = newSource(optionsFilePath, code);
computeResult(target, ANALYSIS_OPTIONS_ERRORS);
expect(task, isGenerateOptionsErrorsTask);
- List<AnalysisError> errors = outputs[ANALYSIS_OPTIONS_ERRORS];
+ List<AnalysisError> errors =
+ outputs[ANALYSIS_OPTIONS_ERRORS] as List<AnalysisError>;
expect(errors, hasLength(1));
expect(errors[0].errorCode, AnalysisOptionsErrorCode.PARSE_ERROR);
}
@@ -250,7 +252,8 @@ analyzer:
AnalysisTarget target = newSource(optionsFilePath, code);
computeResult(target, ANALYSIS_OPTIONS_ERRORS);
expect(task, isGenerateOptionsErrorsTask);
- List<AnalysisError> errors = outputs[ANALYSIS_OPTIONS_ERRORS];
+ List<AnalysisError> errors =
+ outputs[ANALYSIS_OPTIONS_ERRORS] as List<AnalysisError>;
expect(errors, hasLength(1));
expect(errors[0].errorCode,
AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES);
@@ -396,7 +399,7 @@ linter:
[AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE]);
}
- void validate(String source, List<AnalysisOptionsErrorCode> expected) {
+ void validate(String source, List<ErrorCode> expected) {
var options = optionsProvider.getOptionsFromString(source);
var errors = validator.validate(options);
expect(errors.map((AnalysisError e) => e.errorCode),
« no previous file with comments | « pkg/analyzer/test/src/task/inputs_test.dart ('k') | pkg/analyzer/test/src/task/strong/strong_test_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698