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.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 1b7f699ef30..3a4cd8d3244 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -860,10 +860,15 @@ TEST_F(FormatTest, SplitsLongCxxComments) {
EXPECT_EQ("// Don't_touch_leading_whitespace",
format("// Don't_touch_leading_whitespace",
getLLVMStyleWithColumns(20)));
- EXPECT_EQ(
- "//Don't add leading\n"
- "//whitespace",
- format("//Don't add leading whitespace", getLLVMStyleWithColumns(20)));
+ EXPECT_EQ("// Add leading\n"
+ "// whitespace",
+ format("//Add leading whitespace", getLLVMStyleWithColumns(20)));
+ EXPECT_EQ("// whitespace", format("//whitespace", getLLVMStyle()));
+ EXPECT_EQ("// Even if it makes the line exceed the column\n"
+ "// limit",
+ format("//Even if it makes the line exceed the column limit",
+ getLLVMStyleWithColumns(51)));
+ EXPECT_EQ("//--But not here", format("//--But not here", getLLVMStyle()));
EXPECT_EQ("// A comment before\n"
"// a macro\n"
"// definition\n"
OpenPOWER on IntegriCloud