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

Unified Diff: pkg/analyzer_cli/test/driver_test.dart

Issue 1520663002: Driver test fixes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/test/driver_test.dart
diff --git a/pkg/analyzer_cli/test/driver_test.dart b/pkg/analyzer_cli/test/driver_test.dart
index 5a3085e52434bcec1cce00e7ee9b7fb404e99501..e6bd81224131387dcb63218e4be07d50ee78cc5f 100644
--- a/pkg/analyzer_cli/test/driver_test.dart
+++ b/pkg/analyzer_cli/test/driver_test.dart
@@ -297,15 +297,18 @@ linter:
});
test('filters', () {
- var filters =
- driver.context.getConfigurationData(CONFIGURED_ERROR_FILTERS);
- expect(filters, hasLength(1));
+ var processors =
+ driver.context.getConfigurationData(CONFIGURED_ERROR_PROCESSORS);
+ expect(processors, hasLength(1));
- var unused_error = new AnalysisError(
+ var unused_local_variable = new AnalysisError(
new TestSource(), 0, 1, HintCode.UNUSED_LOCAL_VARIABLE, [
['x']
]);
- expect(filters.any((filter) => filter(unused_error)), isTrue);
+
+ var unusedLocalVariable =
+ processors.firstWhere((p) => p.appliesTo(unused_local_variable));
+ expect(unusedLocalVariable.severity, isNull);
});
test('language config', () {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698