clang-format: Fix alignment of ObjC string literals.
This used to interfere with AlwaysBreakBeforeMultilineStrings.
This fixes llvm.org/PR17856.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194310 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index e37f0cd..d02fb34 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -3636,6 +3636,13 @@
"b\\\n"
"c\";",
Break));
+
+ // Exempt ObjC strings for now.
+ EXPECT_EQ("NSString *const kString = @\"aaaa\"\n"
+ " \"bbbb\";",
+ format("NSString *const kString = @\"aaaa\"\n"
+ "\"bbbb\";",
+ Break));
}
TEST_F(FormatTest, AlignsPipes) {