Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Commit 39ca7c5

Browse files
committed
_tests: fix on latest SDKs
1 parent 4cf6539 commit 39ca7c5

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

_tests/lib/compiler.dart

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,19 @@ void expectLogRecords(List<LogRecord> logs, matcher, String reasonPrefix) {
174174
return;
175175
}
176176
logs ??= [];
177-
expect(logs.map(formattedLogMessage), matcher,
178-
reason:
179-
'$reasonPrefix: \n${logs.map((l) => '${formattedLogMessage(l)} at:\n ${l.stackTrace}')}');
177+
expect(
178+
logs
179+
// Ignore cases where the SDK is ahead of pkg:analyzer
180+
.where(
181+
(record) => !record.message.startsWith(
182+
'Your current `analyzer` version may not fully support your current SDK version.',
183+
),
184+
)
185+
.map(formattedLogMessage),
186+
matcher,
187+
reason:
188+
'$reasonPrefix: \n${logs.map((l) => '${formattedLogMessage(l)} at:\n ${l.stackTrace}')}',
189+
);
180190
}
181191

182192
String formattedLogMessage(LogRecord record) {

0 commit comments

Comments
 (0)