aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestJS.cpp
diff options
context:
space:
mode:
authorsstwcw <f0gukp2nk@protonmail.com>2022-03-14 01:24:32 +0000
committersstwcw <f0gukp2nk@protonmail.com>2022-03-14 04:41:40 +0000
commitc24b3db45c7d0f08b423308723cd2e678a0cb7f1 (patch)
tree29362344492c0bb2327581d53c95e3cd4a52a412 /clang/unittests/Format/FormatTestJS.cpp
parent93b5505b456f75ff33be20402b0317cbb2131a66 (diff)
downloadllvm-c24b3db45c7d0f08b423308723cd2e678a0cb7f1.zip
llvm-c24b3db45c7d0f08b423308723cd2e678a0cb7f1.tar.gz
llvm-c24b3db45c7d0f08b423308723cd2e678a0cb7f1.tar.bz2
[clang-format] Add option to align compound assignments like `+=`
Reviewed By: curdeius, HazardyKnusperkeks, MyDeveloperDay Differential Revision: https://reviews.llvm.org/D119599
Diffstat (limited to 'clang/unittests/Format/FormatTestJS.cpp')
-rw-r--r--clang/unittests/Format/FormatTestJS.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/unittests/Format/FormatTestJS.cpp b/clang/unittests/Format/FormatTestJS.cpp
index 67df2d4..85aad28 100644
--- a/clang/unittests/Format/FormatTestJS.cpp
+++ b/clang/unittests/Format/FormatTestJS.cpp
@@ -2699,7 +2699,7 @@ TEST_F(FormatTestJS, NumericSeparators) {
TEST_F(FormatTestJS, AlignConsecutiveDeclarations) {
FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
- Style.AlignConsecutiveDeclarations = FormatStyle::ACS_Consecutive;
+ Style.AlignConsecutiveDeclarations.Enabled = true;
verifyFormat("let letVariable = 5;\n"
"double constVariable = 10;",
Style);
@@ -2736,7 +2736,7 @@ TEST_F(FormatTestJS, AlignConsecutiveDeclarations) {
TEST_F(FormatTestJS, AlignConsecutiveAssignments) {
FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
- Style.AlignConsecutiveAssignments = FormatStyle::ACS_Consecutive;
+ Style.AlignConsecutiveAssignments.Enabled = true;
verifyFormat("let letVariable = 5;\n"
"double constVariable = 10;",
Style);
@@ -2772,8 +2772,8 @@ TEST_F(FormatTestJS, AlignConsecutiveAssignments) {
TEST_F(FormatTestJS, AlignConsecutiveAssignmentsAndDeclarations) {
FormatStyle Style = getGoogleStyle(FormatStyle::LK_JavaScript);
- Style.AlignConsecutiveDeclarations = FormatStyle::ACS_Consecutive;
- Style.AlignConsecutiveAssignments = FormatStyle::ACS_Consecutive;
+ Style.AlignConsecutiveDeclarations.Enabled = true;
+ Style.AlignConsecutiveAssignments.Enabled = true;
verifyFormat("let letVariable = 5;\n"
"double constVariable = 10;",
Style);