diff options
author | Daniel Jasper <djasper@google.com> | 2015-06-18 16:05:17 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2015-06-18 16:05:17 +0000 |
commit | faa3c986ea1efdf9353d6d74fa4ef752cc91b5d2 (patch) | |
tree | bcecbbecc03bb6d32b08cc890d0f85194da8b368 /unittests | |
parent | da9b85642632953df17160488a1aa4e37339484a (diff) | |
download | clang-faa3c986ea1efdf9353d6d74fa4ef752cc91b5d2.tar.gz |
clang-format: Row back on the AlwaysBreakBeforeMultilineStrings change.
It was a bit too aggressive.
With this patch, we keep on breaking here:
aaaaaaaaaaaaa(aaaaaaa,
"aaaaaaa"
"bbbbbbb");
But don't break in:
aaaaaaaaaaaaa(aaaaaaa, aaaaaaaa("aaaaaaa"
"bbbbbbb"));
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 122a1a6c5f..418b7aceea 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -4647,11 +4647,16 @@ TEST_F(FormatTest, AlwaysBreakBeforeMultilineStrings) { verifyFormat("aaaa(qqq, \"bbbb\"\n" " \"cccc\");", NoBreak); - verifyFormat("aaaa(qqq, \"bbbb\"\n" - " \"cccc\");", + verifyFormat("aaaa(qqq,\n" + " \"bbbb\"\n" + " \"cccc\");", + Break); + verifyFormat("aaaa(qqq,\n" + " L\"bbbb\"\n" + " L\"cccc\");", Break); - verifyFormat("aaaa(qqq, L\"bbbb\"\n" - " L\"cccc\");", + verifyFormat("aaaaa(aaaaaa, aaaaaaa(\"aaaa\"\n" + " \"bbbb\"));", Break); // As we break before unary operators, breaking right after them is bad. |