Skip to content

Commit f59751f

Browse files
srawlinsCommit Queue
authored andcommitted
Move FixProcessorErrorCodeTest.diagnosticCodeFilter
Only one test implementation used it, and it can be a proper function instead of a getter that returns a function. Work towards #55660 Change-Id: I9f6e6d4c6f88c0b613c69abec6b714ef5fe4bf64 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426401 Auto-Submit: Samuel Rawlins <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Brian Wilkerson <[email protected]>
1 parent c3e9133 commit f59751f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/analysis_server/test/src/services/correction/fix/fix_processor.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,6 @@ abstract class FixInFileProcessorTest extends BaseFixProcessorTest {
302302
abstract class FixProcessorErrorCodeTest extends FixProcessorTest {
303303
/// The diagnostic code being tested.
304304
DiagnosticCode get diagnosticCode;
305-
306-
ErrorFilter get diagnosticCodeFilter => (AnalysisError e) {
307-
return e.errorCode == diagnosticCode;
308-
};
309305
}
310306

311307
/// A base class defining support for writing fix processor tests that are

pkg/analysis_server/test/src/services/correction/fix/merge_combinators_test.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,10 @@ import 'other.dart' show FutureOr, Completer, Timer;
554554
}
555555

556556
abstract class _MergeCombinatorTest extends FixProcessorErrorCodeTest {
557+
bool diagnosticCodeFilter(AnalysisError e) {
558+
return e.errorCode == diagnosticCode;
559+
}
560+
557561
@override
558562
void setUp() {
559563
super.setUp();

0 commit comments

Comments
 (0)