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.cpp22
1 files changed, 14 insertions, 8 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index a902466c4c..53f3773d5c 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/unittests/Format/FormatTest.cpp
@@ -588,17 +588,23 @@ TEST_F(FormatTest, CommentsInStaticInitializers) {
EXPECT_EQ("S s = {\n"
" // Some comment\n"
- " a\n"
+ " a,\n"
"\n"
" // Comment after empty line\n"
" b\n"
- "}", format("S s = {\n"
- " // Some comment\n"
- " a\n"
- " \n"
- " // Comment after empty line\n"
- " b\n"
- "}"));
+ "}",
+ format("S s = {\n"
+ " // Some comment\n"
+ " a,\n"
+ " \n"
+ " // Comment after empty line\n"
+ " b\n"
+ "}"));
+ EXPECT_EQ("S s = { a, b };", format("S s = {\n"
+ " a,\n"
+ "\n"
+ " b\n"
+ "};"));
}
//===----------------------------------------------------------------------===//