diff options
Diffstat (limited to 'clang-tools-extra/unittests/clang-tidy/LLVMModuleTest.cpp')
-rw-r--r-- | clang-tools-extra/unittests/clang-tidy/LLVMModuleTest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang-tools-extra/unittests/clang-tidy/LLVMModuleTest.cpp b/clang-tools-extra/unittests/clang-tidy/LLVMModuleTest.cpp index 199329b8ede..0d43cc933f6 100644 --- a/clang-tools-extra/unittests/clang-tidy/LLVMModuleTest.cpp +++ b/clang-tools-extra/unittests/clang-tidy/LLVMModuleTest.cpp @@ -170,6 +170,20 @@ TEST(LLVMHeaderGuardCheckTest, FixHeaderGuards) { runHeaderGuardCheckWithEndif( "#ifndef LLVM_ADT_FOO_H_\n#define LLVM_ADT_FOO_H_\n#endif // LLVM\n", "include/llvm/ADT/foo.h")); + + EXPECT_EQ("#ifndef LLVM_ADT_FOO_H\n#define LLVM_ADT_FOO_H\n#endif \\ \n// " + "LLVM_ADT_FOO_H\n", + runHeaderGuardCheckWithEndif("#ifndef LLVM_ADT_FOO_H\n#define " + "LLVM_ADT_FOO_H\n#endif \\ \n// " + "LLVM_ADT_FOO_H\n", + "include/llvm/ADT/foo.h")); + + EXPECT_EQ("#ifndef LLVM_ADT_FOO_H\n#define LLVM_ADT_FOO_H\n#endif /* " + "LLVM_ADT_FOO_H\\ \n FOO */", + runHeaderGuardCheckWithEndif( + "#ifndef LLVM_ADT_FOO_H\n#define LLVM_ADT_FOO_H\n#endif /* " + "LLVM_ADT_FOO_H\\ \n FOO */", + "include/llvm/ADT/foo.h")); } #endif |