mirror of
https://github.com/dart-lang/sdk
synced 2024-09-18 20:51:19 +00:00
Driver test fixes.
* Updates to use new CONFIGURED_ERROR_PROCESSORS (rather than defunct CONFIGURED_ERROR_FILTERS). BUG= R=keertip@google.com Review URL: https://codereview.chromium.org/1520663002 .
This commit is contained in:
parent
f8b7d8d752
commit
ad7c566e04
|
@ -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', () {
|
||||
|
|
Loading…
Reference in a new issue