[clang] [clang-format] Add parse tests for SeparateDefinitionBlocks option (PR #78256)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 16 02:58:04 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang-format
Author: serbanu (seranu)
<details>
<summary>Changes</summary>
Add config parse tests for SeparateDefinitionBlocks option.
---
Full diff: https://github.com/llvm/llvm-project/pull/78256.diff
1 Files Affected:
- (modified) clang/unittests/Format/ConfigParseTest.cpp (+9)
``````````diff
diff --git a/clang/unittests/Format/ConfigParseTest.cpp b/clang/unittests/Format/ConfigParseTest.cpp
index 6c0f9ddac5ac8f..f409a6a946f3d9 100644
--- a/clang/unittests/Format/ConfigParseTest.cpp
+++ b/clang/unittests/Format/ConfigParseTest.cpp
@@ -996,6 +996,15 @@ TEST(ConfigParseTest, ParsesConfiguration) {
FormatStyle::BBNSS_OnlyWithParen);
CHECK_PARSE("AllowBreakBeforeNoexceptSpecifier: Never",
AllowBreakBeforeNoexceptSpecifier, FormatStyle::BBNSS_Never);
+
+
+ Style.SeparateDefinitionBlocks = FormatStyle::SDS_Never;
+ CHECK_PARSE("SeparateDefinitionBlocks: Always", SeparateDefinitionBlocks,
+ FormatStyle::SDS_Always);
+ CHECK_PARSE("SeparateDefinitionBlocks: Leave", SeparateDefinitionBlocks,
+ FormatStyle::SDS_Leave);
+ CHECK_PARSE("SeparateDefinitionBlocks: Never", SeparateDefinitionBlocks,
+ FormatStyle::SDS_Never);
}
TEST(ConfigParseTest, ParsesConfigurationWithLanguages) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/78256
More information about the cfe-commits
mailing list