diff options
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 4fefb9627e..dba6183e09 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -576,6 +576,20 @@ TEST_F(FormatTest, CommentsInStaticInitializers) { " d, e, f },\n" " { // Group #3\n" " g, h, i } };"); + + EXPECT_EQ("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" + "}")); } //===----------------------------------------------------------------------===// |