Skip to content

Commit

Permalink
update test expectations (#3903)
Browse files Browse the repository at this point in the history
  • Loading branch information
devoncarew authored Oct 9, 2024
1 parent fa3a351 commit 2d82987
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 5 additions & 3 deletions lib/src/warnings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -540,15 +540,17 @@ class PackageWarningCounter {
bool get hasWarnings => _countedWarnings.isNotEmpty;

/// Whether we've already warned for this combination of [element], [kind],
/// and [message].
bool hasWarning(Warnable? element, PackageWarning kind, String message) {
/// and [messageFragment].
bool hasWarning(
Warnable? element, PackageWarning kind, String messageFragment) {
if (element == null) {
return false;
}
final warning = _countedWarnings[element.element];
if (warning != null) {
final messages = warning[kind];
return messages != null && messages.contains(message);
return messages != null &&
messages.any((message) => message.contains(messageFragment));
}
return false;
}
Expand Down
3 changes: 1 addition & 2 deletions test/documentation_comment_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -451,8 +451,7 @@ Three.'''));
libraryModel,
hasInvalidParameterWarning(
'The {@animation ...} directive was called with invalid '
'parameters. FormatException: Could not find an option named '
'"name".'),
'parameters. FormatException: Could not find an option named'),
);
}

Expand Down

0 comments on commit 2d82987

Please sign in to comment.