summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r--clang/unittests/Format/FormatTest.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index cf5c9ff1efb..584ecba9866 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -4167,6 +4167,12 @@ TEST_F(FormatTest, AlwaysBreakBeforeMultilineStrings) {
" L\"cccc\");",
Break);
+ // As we break before unary operators, breaking right after them is bad.
+ verifyFormat("string foo = abc ? \"x\"\n"
+ " \"blah blah blah blah blah blah\"\n"
+ " : \"y\";",
+ Break);
+
// Don't break if there is no column gain.
verifyFormat("f(\"aaaa\"\n"
" \"bbbb\");",
OpenPOWER on IntegriCloud