aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/ConfigParseTest.cpp
diff options
context:
space:
mode:
authorrmarker <37921131+rmarker@users.noreply.github.com>2024-02-13 14:58:33 +1030
committerGitHub <noreply@github.com>2024-02-12 20:28:33 -0800
commit91dcf53abd34fa836a126c706f87b810d299d802 (patch)
tree34e3723eda77f8b5e159d4bda70abe5bad845918 /clang/unittests/Format/ConfigParseTest.cpp
parent070fad422834faab1f0ffc90e21e25d2f524b17b (diff)
downloadllvm-91dcf53abd34fa836a126c706f87b810d299d802.zip
llvm-91dcf53abd34fa836a126c706f87b810d299d802.tar.gz
llvm-91dcf53abd34fa836a126c706f87b810d299d802.tar.bz2
[clang-format] Rename option AlwaysBreakAfterReturnType. (#80827)
Changes the option to BreakAfterReturnType option, with a more relevant name, deprecating and replacing AlwaysBreakAfterReturnType. Following up on #78010.
Diffstat (limited to 'clang/unittests/Format/ConfigParseTest.cpp')
-rw-r--r--clang/unittests/Format/ConfigParseTest.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/unittests/Format/ConfigParseTest.cpp b/clang/unittests/Format/ConfigParseTest.cpp
index 571e1eb..ee8a556 100644
--- a/clang/unittests/Format/ConfigParseTest.cpp
+++ b/clang/unittests/Format/ConfigParseTest.cpp
@@ -678,6 +678,22 @@ TEST(ConfigParseTest, ParsesConfiguration) {
BraceWrapping.AfterControlStatement, FormatStyle::BWACS_Never);
Style.AlwaysBreakAfterReturnType = FormatStyle::RTBS_All;
+ CHECK_PARSE("BreakAfterReturnType: None", AlwaysBreakAfterReturnType,
+ FormatStyle::RTBS_None);
+ CHECK_PARSE("BreakAfterReturnType: Automatic", AlwaysBreakAfterReturnType,
+ FormatStyle::RTBS_Automatic);
+ CHECK_PARSE("BreakAfterReturnType: ExceptShortType",
+ AlwaysBreakAfterReturnType, FormatStyle::RTBS_ExceptShortType);
+ CHECK_PARSE("BreakAfterReturnType: All", AlwaysBreakAfterReturnType,
+ FormatStyle::RTBS_All);
+ CHECK_PARSE("BreakAfterReturnType: TopLevel", AlwaysBreakAfterReturnType,
+ FormatStyle::RTBS_TopLevel);
+ CHECK_PARSE("BreakAfterReturnType: AllDefinitions",
+ AlwaysBreakAfterReturnType, FormatStyle::RTBS_AllDefinitions);
+ CHECK_PARSE("BreakAfterReturnType: TopLevelDefinitions",
+ AlwaysBreakAfterReturnType,
+ FormatStyle::RTBS_TopLevelDefinitions);
+ // For backward compatibility:
CHECK_PARSE("AlwaysBreakAfterReturnType: None", AlwaysBreakAfterReturnType,
FormatStyle::RTBS_None);
CHECK_PARSE("AlwaysBreakAfterReturnType: Automatic",