From 5ca168b0321136930fc4f1b6ba858996963a24c2 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Wed, 10 Mar 2021 13:53:40 +0000 Subject: [PATCH] [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 --- llvm/unittests/FileCheck/FileCheckTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/unittests/FileCheck/FileCheckTest.cpp b/llvm/unittests/FileCheck/FileCheckTest.cpp index f54b940..59befc0 100644 --- a/llvm/unittests/FileCheck/FileCheckTest.cpp +++ b/llvm/unittests/FileCheck/FileCheckTest.cpp @@ -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. -- 2.7.4