[FileCheck, test] Rename checkWildcardRegexCharMatchFailure

Proposed edit https://reviews.llvm.org/D97845#inline-922769 in D97845
suggests the checkWildcardRegexCharMatchFailure function name is
misleading because it is not clear it checks for a match failure on each
character in the string parameter. This commit renames it to an
hopefully clearer name.

Reviewed By: jdenny

Differential Revision: https://reviews.llvm.org/D98343
This commit is contained in:
Thomas Preud'homme 2021-03-10 13:53:40 +00:00
parent 4fae63c612
commit 5ca168b032
1 changed files with 3 additions and 3 deletions

View File

@ -161,7 +161,7 @@ struct ExpressionFormatParameterisedFixture
return (Twine(Prefix) + Twine(Num)).str();
}
void checkWildcardRegexCharMatchFailure(StringRef Chars) const {
void checkPerCharWildcardRegexMatchFailure(StringRef Chars) const {
for (auto C : Chars) {
std::string Str = addBasePrefix(StringRef(&C, 1));
EXPECT_FALSE(WildcardRegex.match(Str));
@ -259,9 +259,9 @@ TEST_P(ExpressionFormatParameterisedFixture, FormatGetWildcardRegex) {
if (AllowHex) {
LongNumberStr = addBasePrefix(AcceptedHexOnlyDigits);
checkWildcardRegexMatch(LongNumberStr, 16);
checkWildcardRegexCharMatchFailure(RefusedHexOnlyDigits);
checkPerCharWildcardRegexMatchFailure(RefusedHexOnlyDigits);
}
checkWildcardRegexCharMatchFailure(FirstInvalidCharDigits);
checkPerCharWildcardRegexMatchFailure(FirstInvalidCharDigits);
// Check leading zeros are only accepted if number of digits is less than the
// precision.