summaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTestSelective.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Format/FormatTestSelective.cpp')
-rw-r--r--unittests/Format/FormatTestSelective.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/unittests/Format/FormatTestSelective.cpp b/unittests/Format/FormatTestSelective.cpp
index 2bc60fd1e0d3..367dbafcaf4c 100644
--- a/unittests/Format/FormatTestSelective.cpp
+++ b/unittests/Format/FormatTestSelective.cpp
@@ -111,13 +111,19 @@ TEST_F(FormatTestSelective, FormatsCommentsLocally) {
format("int a; // comment\n"
"int b; // comment",
0, 0));
- EXPECT_EQ("int a; // comment\n"
- " // line 2\n"
+ EXPECT_EQ("int a; // comment\n"
+ " // line 2\n"
"int b;",
format("int a; // comment\n"
" // line 2\n"
"int b;",
28, 0));
+ EXPECT_EQ("int a; // comment\n"
+ "// comment 2\n"
+ "int b;",
+ format("int a; // comment\n"
+ "// comment 2\n"
+ "int b;", 28, 0));
EXPECT_EQ("int aaaaaa; // comment\n"
"int b;\n"
"int c; // unrelated comment",