[clang-format] Add parse tests for SeparateDefinitionBlocks option (#78256)

Add config parse tests for SeparateDefinitionBlocks option.
This commit is contained in:
serbanu 2024-01-16 22:22:04 +02:00 committed by GitHub
parent 4737959d91
commit 59a265311a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -996,6 +996,14 @@ 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) {