summaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTestComments.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTestComments.cpp')
-rw-r--r--unittests/Format/FormatTestComments.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestComments.cpp b/unittests/Format/FormatTestComments.cpp
index 2b07dedf67061..9f43677b70dfa 100644
--- a/unittests/Format/FormatTestComments.cpp
+++ b/unittests/Format/FormatTestComments.cpp
@@ -1254,6 +1254,12 @@ TEST_F(FormatTestComments, SplitsLongLinesInComments) {
" */",
getLLVMStyleWithColumns(20)));
+ // This reproduces a crashing bug where both adaptStartOfLine and
+ // getCommentSplit were trying to wrap after the "/**".
+ EXPECT_EQ("/** multilineblockcommentwithnowrapopportunity */",
+ format("/** multilineblockcommentwithnowrapopportunity */",
+ getLLVMStyleWithColumns(20)));
+
EXPECT_EQ("/*\n"
"\n"
"\n"