Skip to content

Lit test macro-to-enum.cpp does not work as expected. #172391

@earnol

Description

@earnol

When changing test lang-tools-extra/test/clang-tidy/checkers/modernize/macro-to-enum.cpp i have noticed adding:

diff --git a/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/macro-to-enum/modernize-macro-to-enum.h b/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/macro-     to-enum/modernize-macro-to-enum.h
index f747be4761bb..eff79fe7e3c7 100644
--- a/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/macro-to-enum/modernize-macro-to-enum.h
+++ b/clang-tools-extra/test/clang-tidy/checkers/modernize/Inputs/macro-to-enum/modernize-macro-to-enum.h
@@ -6,7 +6,7 @@
 #define GG_RED 0xFF0000
 #define GG_GREEN 0x00FF00
 #define GG_BLUE 0x0000FF
-// CHECK-MESSAGES: :[[@LINE-3]]:1: warning: replace macro with enum
+// CHECK-MESSAGES: :[[@LINE-3]]:1: warning: replace macro with enuuum
 // CHECK-MESSAGES: :[[@LINE-4]]:9: warning: macro 'GG_RED' defines an integral constant; prefer an enum instead
 // CHECK-MESSAGES: :[[@LINE-4]]:9: warning: macro 'GG_GREEN' defines an integral constant; prefer an enum instead
 // CHECK-MESSAGES: :[[@LINE-4]]:9: warning: macro 'GG_BLUE' defines an integral constant; prefer an enum instead

does not make test to fail as expected. Actually all CHECK-MESSAGES statement are completely ignored in the header files and test passes no matter what is written in those.
Observed behavior:
Test passes with completely wrong test statements.

Expected behavior:
Test fails if modified in unexpected way.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions