summaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-14 15:38:35 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-14 15:38:35 +0000
commitd2e0a8dd949ab874c6d66f97106bd5c270e2fa7d (patch)
treee8a99a0386e8f6bece630700da5915c8a312c2d9 /unittests/Format/FormatTest.cpp
parentfdc82ccb3f2b23a89e7002fe8238e1422b00f96a (diff)
Notes
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 629e85803d64a..b402b5c4a54c2 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -6816,6 +6816,14 @@ TEST_F(FormatTest, FormatsBracedListsInColumnLayout) {
" aaaaaa.aaaaaaa,\n"
" aaaaaa.aaaaaaa,\n"
"};");
+
+ // Don't create hanging lists.
+ verifyFormat("someFunction(Param,\n"
+ " {List1, List2,\n"
+ " List3});",
+ getLLVMStyleWithColumns(35));
+ verifyFormat("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaaaaaaaa, {},\n"
+ " aaaaaaaaaaaaaaaaaaaaaaa);");
}
TEST_F(FormatTest, PullTrivialFunctionDefinitionsIntoSingleLine) {