summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTestObjC.cpp')
-rw-r--r--clang/unittests/Format/FormatTestObjC.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestObjC.cpp b/clang/unittests/Format/FormatTestObjC.cpp
index c29bf8545ab..fc1ee2574c0 100644
--- a/clang/unittests/Format/FormatTestObjC.cpp
+++ b/clang/unittests/Format/FormatTestObjC.cpp
@@ -1218,6 +1218,17 @@ TEST_F(FormatTestObjC, BreaksCallStatementWhereSemiJustOverTheLimit) {
"}");
}
+TEST_F(FormatTestObjC, AlwaysBreakBeforeMultilineStrings) {
+ Style = getGoogleStyle(FormatStyle::LK_ObjC);
+ Style.ColumnLimit = 40;
+ verifyFormat("aaaa = @\"bbbb\"\n"
+ " @\"cccc\";");
+ verifyFormat("aaaa(@\"bbbb\"\n"
+ " @\"cccc\");");
+ verifyFormat("aaaa(qqq, @\"bbbb\"\n"
+ " @\"cccc\");");
+}
+
} // end namespace
} // end namespace format
} // end namespace clang
OpenPOWER on IntegriCloud