[llvm] 5ca168b - [FileCheck, test] Rename checkWildcardRegexCharMatchFailure

Thomas Preud'homme via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 8 13:57:54 PDT 2021


Author: Thomas Preud'homme
Date: 2021-04-08T21:57:55+01:00
New Revision: 5ca168b0321136930fc4f1b6ba858996963a24c2

URL: https://github.com/llvm/llvm-project/commit/5ca168b0321136930fc4f1b6ba858996963a24c2
DIFF: https://github.com/llvm/llvm-project/commit/5ca168b0321136930fc4f1b6ba858996963a24c2.diff

LOG: [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

Added: 
    

Modified: 
    llvm/unittests/FileCheck/FileCheckTest.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/unittests/FileCheck/FileCheckTest.cpp b/llvm/unittests/FileCheck/FileCheckTest.cpp
index f54b940d68c4f..59befc0efb8a5 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.


        


More information about the llvm-commits mailing list