aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format
diff options
context:
space:
mode:
authorSirraide <aeternalmail@gmail.com>2025-01-21 14:13:13 +0100
committerGitHub <noreply@github.com>2025-01-21 14:13:13 +0100
commit33656932b0e9098354b2e685d6ed70bd0bcb246a (patch)
tree0966504fcd2c427134d53d0ba4aee38c50f3cc34 /clang/unittests/Format
parent5d9c717597aef72e4ba27a2b143e9753c513e5c9 (diff)
downloadllvm-33656932b0e9098354b2e685d6ed70bd0bcb246a.zip
llvm-33656932b0e9098354b2e685d6ed70bd0bcb246a.tar.gz
llvm-33656932b0e9098354b2e685d6ed70bd0bcb246a.tar.bz2
[clang-format] Rename ExportBlockIndentation -> IndentExportBlock (#123493)
This renames the `ExportBlockIndentation` option and adds a config parse test, as requested in #110381.
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r--clang/unittests/Format/ConfigParseTest.cpp1
-rw-r--r--clang/unittests/Format/FormatTest.cpp8
2 files changed, 5 insertions, 4 deletions
diff --git a/clang/unittests/Format/ConfigParseTest.cpp b/clang/unittests/Format/ConfigParseTest.cpp
index 1f0beaf..9746aa3 100644
--- a/clang/unittests/Format/ConfigParseTest.cpp
+++ b/clang/unittests/Format/ConfigParseTest.cpp
@@ -176,6 +176,7 @@ TEST(ConfigParseTest, ParsesConfigurationBools) {
CHECK_PARSE_BOOL(IndentAccessModifiers);
CHECK_PARSE_BOOL(IndentCaseBlocks);
CHECK_PARSE_BOOL(IndentCaseLabels);
+ CHECK_PARSE_BOOL(IndentExportBlock);
CHECK_PARSE_BOOL(IndentGotoLabels);
CHECK_PARSE_BOOL(IndentRequiresClause);
CHECK_PARSE_BOOL_FIELD(IndentRequiresClause, "IndentRequires");
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 9623187..61aa140 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -9059,9 +9059,9 @@ TEST_F(FormatTest, AdaptiveOnePerLineFormatting) {
Style);
}
-TEST_F(FormatTest, ExportBlockIndentation) {
+TEST_F(FormatTest, IndentExportBlock) {
FormatStyle Style = getLLVMStyleWithColumns(80);
- Style.ExportBlockIndentation = true;
+ Style.IndentExportBlock = true;
verifyFormat("export {\n"
" int x;\n"
" int y;\n"
@@ -9072,7 +9072,7 @@ TEST_F(FormatTest, ExportBlockIndentation) {
"}",
Style);
- Style.ExportBlockIndentation = false;
+ Style.IndentExportBlock = false;
verifyFormat("export {\n"
"int x;\n"
"int y;\n"
@@ -9086,7 +9086,7 @@ TEST_F(FormatTest, ExportBlockIndentation) {
TEST_F(FormatTest, ShortExportBlocks) {
FormatStyle Style = getLLVMStyleWithColumns(80);
- Style.ExportBlockIndentation = false;
+ Style.IndentExportBlock = false;
Style.AllowShortBlocksOnASingleLine = FormatStyle::SBS_Never;
verifyFormat("export {\n"