diff options
author | Owen Pan <owenpiano@gmail.com> | 2024-10-07 19:12:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-07 19:12:47 -0700 |
commit | 65688274b14f5d0e7dabbbaf9f3fd135646ef1d1 (patch) | |
tree | 0eee87c4ad05a1f0444f7538d5a0cc57df2bef65 /clang/unittests/Format/ConfigParseTest.cpp | |
parent | 4b6e41b61e2edea2f80de3639e589301fe7c896c (diff) | |
download | llvm-65688274b14f5d0e7dabbbaf9f3fd135646ef1d1.zip llvm-65688274b14f5d0e7dabbbaf9f3fd135646ef1d1.tar.gz llvm-65688274b14f5d0e7dabbbaf9f3fd135646ef1d1.tar.bz2 |
[clang-format][NFC] Clean up AlignConsecutiveStyle (#111285)
- Add a `CHECK_PARSE` for `AcrossComments`.
- Add a `CHECK_PARSE_NESTED_BOOL` for `AlignFunctionPointers`.
- Remove redundant statements.
- Clean up documentation.
Diffstat (limited to 'clang/unittests/Format/ConfigParseTest.cpp')
-rw-r--r-- | clang/unittests/Format/ConfigParseTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/unittests/Format/ConfigParseTest.cpp b/clang/unittests/Format/ConfigParseTest.cpp index aa8fbb8..9abb8a1 100644 --- a/clang/unittests/Format/ConfigParseTest.cpp +++ b/clang/unittests/Format/ConfigParseTest.cpp @@ -317,6 +317,13 @@ TEST(ConfigParseTest, ParsesConfiguration) { /*AlignFunctionDeclarations=*/true, \ /*AlignFunctionPointers=*/false, /*PadOperators=*/true})); \ CHECK_PARSE( \ + #FIELD ": AcrossComments", FIELD, \ + FormatStyle::AlignConsecutiveStyle( \ + {/*Enabled=*/true, /*AcrossEmptyLines=*/false, \ + /*AcrossComments=*/true, /*AlignCompound=*/false, \ + /*AlignFunctionDeclarations=*/true, \ + /*AlignFunctionPointers=*/false, /*PadOperators=*/true})); \ + CHECK_PARSE( \ #FIELD ": AcrossEmptyLinesAndComments", FIELD, \ FormatStyle::AlignConsecutiveStyle( \ {/*Enabled=*/true, /*AcrossEmptyLines=*/true, \ @@ -339,6 +346,7 @@ TEST(ConfigParseTest, ParsesConfiguration) { CHECK_PARSE_NESTED_BOOL(FIELD, AcrossComments); \ CHECK_PARSE_NESTED_BOOL(FIELD, AlignCompound); \ CHECK_PARSE_NESTED_BOOL(FIELD, AlignFunctionDeclarations); \ + CHECK_PARSE_NESTED_BOOL(FIELD, AlignFunctionPointers); \ CHECK_PARSE_NESTED_BOOL(FIELD, PadOperators); \ } while (false) |