[clang-format] Add a regression test for aligning macros with keywords.
authorMarek Kurdej <marek.kurdej+llvm.org@gmail.com>
Tue, 3 May 2022 09:08:34 +0000 (11:08 +0200)
committerMarek Kurdej <marek.kurdej+llvm.org@gmail.com>
Tue, 3 May 2022 09:09:38 +0000 (11:09 +0200)
Test from issue https://github.com/llvm/llvm-project/issues/54953.

clang/unittests/Format/FormatTest.cpp

index da25395..37f3269 100644 (file)
@@ -16030,6 +16030,10 @@ TEST_F(FormatTest, AlignConsecutiveMacros) {
                "#define ccc  (5)",
                Style);
 
+  verifyFormat("#define true  1\n"
+               "#define false 0",
+               Style);
+
   verifyFormat("#define f(x)         (x * x)\n"
                "#define fff(x, y, z) (x * y + z)\n"
                "#define ffff(x, y)   (x - y)",