summaryrefslogtreecommitdiffstats
path: root/clang/unittests
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests')
-rw-r--r--clang/unittests/Format/FormatTest.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index aa2a70987ba..3d5c21a2f77 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -5004,6 +5004,11 @@ TEST_F(FormatTest, SkipsUnknownStringLiterals) {
format("L\"unsupported literal\";", getGoogleStyleWithColumns(15)));
EXPECT_EQ("R\"x(raw literal)x\";",
format("R\"x(raw literal)x\";", getGoogleStyleWithColumns(15)));
+ verifyFormat("string a = \"unterminated;");
+ EXPECT_EQ("function(\"unterminated,\n"
+ " OtherParameter);",
+ format("function( \"unterminated,\n"
+ " OtherParameter);"));
}
TEST_F(FormatTest, DoesNotTryToParseUDLiteralsInPreCpp11Code) {
OpenPOWER on IntegriCloud