aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/ConfigParseTest.cpp
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2024-02-09 19:53:04 -0800
committerGitHub <noreply@github.com>2024-02-09 19:53:04 -0800
commitc5cbfc5689a26651634e1990b430e917d1ae85da (patch)
tree30f4dba298eb5db2c4a4d5ad7eed55f70f49401f /clang/unittests/Format/ConfigParseTest.cpp
parent637c37025d2a9747d440034fff7b4d549dead6f3 (diff)
downloadllvm-c5cbfc5689a26651634e1990b430e917d1ae85da.zip
llvm-c5cbfc5689a26651634e1990b430e917d1ae85da.tar.gz
llvm-c5cbfc5689a26651634e1990b430e917d1ae85da.tar.bz2
[clang-format] Rename option AlwaysBreakTemplateDeclarations (#81093)
Drop the "Always" prefix to remove the self-contradiction.
Diffstat (limited to 'clang/unittests/Format/ConfigParseTest.cpp')
-rw-r--r--clang/unittests/Format/ConfigParseTest.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/unittests/Format/ConfigParseTest.cpp b/clang/unittests/Format/ConfigParseTest.cpp
index 7493b0a..22681a2 100644
--- a/clang/unittests/Format/ConfigParseTest.cpp
+++ b/clang/unittests/Format/ConfigParseTest.cpp
@@ -695,6 +695,19 @@ TEST(ConfigParseTest, ParsesConfiguration) {
FormatStyle::RTBS_TopLevelDefinitions);
Style.AlwaysBreakTemplateDeclarations = FormatStyle::BTDS_Yes;
+ CHECK_PARSE("BreakTemplateDeclarations: Leave",
+ AlwaysBreakTemplateDeclarations, FormatStyle::BTDS_Leave);
+ CHECK_PARSE("BreakTemplateDeclarations: No", AlwaysBreakTemplateDeclarations,
+ FormatStyle::BTDS_No);
+ CHECK_PARSE("BreakTemplateDeclarations: MultiLine",
+ AlwaysBreakTemplateDeclarations, FormatStyle::BTDS_MultiLine);
+ CHECK_PARSE("BreakTemplateDeclarations: Yes", AlwaysBreakTemplateDeclarations,
+ FormatStyle::BTDS_Yes);
+ CHECK_PARSE("BreakTemplateDeclarations: false",
+ AlwaysBreakTemplateDeclarations, FormatStyle::BTDS_MultiLine);
+ CHECK_PARSE("BreakTemplateDeclarations: true",
+ AlwaysBreakTemplateDeclarations, FormatStyle::BTDS_Yes);
+ // For backward compatibility:
CHECK_PARSE("AlwaysBreakTemplateDeclarations: Leave",
AlwaysBreakTemplateDeclarations, FormatStyle::BTDS_Leave);
CHECK_PARSE("AlwaysBreakTemplateDeclarations: No",