aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 0095d58c6b..97539d91a6 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -621,6 +621,13 @@ TEST_F(FormatTest, CanFormatCommentsLocally) {
" // line 2\n"
"int b;",
28, 0, getLLVMStyle()));
+ EXPECT_EQ("int aaaaaa; // comment\n"
+ "int b;\n"
+ "int c; // unrelated comment",
+ format("int aaaaaa; // comment\n"
+ "int b;\n"
+ "int c; // unrelated comment",
+ 31, 0, getLLVMStyle()));
}
TEST_F(FormatTest, RemovesTrailingWhitespaceOfComments) {