Skip to content

Commit faa1996

Browse files
committed
Add unit tests
1 parent 91c9b81 commit faa1996

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/unittests/Format/FormatTest.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15838,6 +15838,10 @@ TEST_F(FormatTest, BreaksWideAndNSStringLiterals) {
1583815838
"@\"NSString literal\";", getGoogleStyleWithColumns(19));
1583915839
verifyFormat(R"(NSString *s = @"那那那那";)", getLLVMStyleWithColumns(26));
1584015840

15841+
EXPECT_EQ("L\"suffixed \"\n"
15842+
"L\"string\"_s;",
15843+
format("L\"suffixed string\"_s;", getLLVMStyleWithColumns(19)));
15844+
1584115845
// This input makes clang-format try to split the incomplete unicode escape
1584215846
// sequence, which used to lead to a crasher.
1584315847
verifyNoCrash(

0 commit comments

Comments
 (0)