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.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp
index 96ea9de9c67..cff178eeb97 100644
--- a/clang/unittests/Format/FormatTest.cpp
+++ b/clang/unittests/Format/FormatTest.cpp
@@ -3967,7 +3967,7 @@ TEST_F(FormatTest, BlockComments) {
EXPECT_EQ("/*\n"
"*\n"
" * aaaaaa\n"
- "* aaaaaa\n"
+ "*aaaaaa\n"
"*/",
format("/*\n"
"*\n"
@@ -3977,7 +3977,7 @@ TEST_F(FormatTest, BlockComments) {
EXPECT_EQ("/*\n"
"**\n"
"* aaaaaa\n"
- "* aaaaaa\n"
+ "*aaaaaa\n"
"*/",
format("/*\n"
"**\n"
@@ -4017,6 +4017,33 @@ TEST_F(FormatTest, BlockComments) {
"int cccccccccccccccccccccccccccccc; /* comment */\n"));
verifyFormat("void f(int * /* unused */) {}");
+
+ EXPECT_EQ("/*\n"
+ " **\n"
+ " */",
+ format("/*\n"
+ " **\n"
+ " */"));
+ EXPECT_EQ("/*\n"
+ " *q\n"
+ " */",
+ format("/*\n"
+ " *q\n"
+ " */"));
+ EXPECT_EQ("/*\n"
+ " * q\n"
+ " */",
+ format("/*\n"
+ " * q\n"
+ " */"));
+ EXPECT_EQ("/*\n"
+ " **/",
+ format("/*\n"
+ " **/"));
+ EXPECT_EQ("/*\n"
+ " ***/",
+ format("/*\n"
+ " ***/"));
}
TEST_F(FormatTest, BlockCommentsInMacros) {
OpenPOWER on IntegriCloud