aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format')
-rw-r--r--clang/unittests/Format/FormatTest.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index a3ad978..ce68f91 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -20777,6 +20777,30 @@ TEST_F(FormatTest, AlignWithLineBreaks) {
"}",
Style);
// clang-format on
+
+ Style = getLLVMStyleWithColumns(70);
+ Style.AlignConsecutiveDeclarations.Enabled = true;
+ verifyFormat(
+ "ReturnType\n"
+ "MyFancyIntefaceFunction(Context *context,\n"
+ " ALongTypeName *response) noexcept override;\n"
+ "ReturnType func();",
+ Style);
+
+ verifyFormat(
+ "ReturnType\n"
+ "MyFancyIntefaceFunction(B<int> *context,\n"
+ " decltype(AFunc) *response) noexcept override;\n"
+ "ReturnType func();",
+ Style);
+
+ Style.AlignConsecutiveAssignments.Enabled = true;
+ Style.ColumnLimit = 15;
+ verifyFormat("int i1 = 1;\n"
+ "k = bar(\n"
+ " argument1,\n"
+ " argument2);",
+ Style);
}
TEST_F(FormatTest, AlignWithInitializerPeriods) {