diff options
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 219d73c04d..32b2ff7f75 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -447,6 +447,9 @@ TEST_F(FormatTest, UnderstandsSingleLineComments) { format("int i;\\\n// single line trailing comment")); verifyGoogleFormat("int a; // Trailing comment."); + + verifyFormat("someFunction(anotherFunction( // Force break.\n" + " parameter));"); } TEST_F(FormatTest, UnderstandsMultiLineComments) { @@ -461,6 +464,11 @@ TEST_F(FormatTest, UnderstandsMultiLineComments) { " /* Leading comment for bb... */ bbbbbbbbbbbbbbbbbbbbbbbbb);", format("f(aaaaaaaaaaaaaaaaaaaaaaaaa , \n" "/* Leading comment for bb... */ bbbbbbbbbbbbbbbbbbbbbbbbb);")); + + verifyGoogleFormat("aaaaaaaa(/* parameter 1 */ aaaaaa,\n" + " /* parameter 2 */ aaaaaa,\n" + " /* parameter 3 */ aaaaaa,\n" + " /* parameter 4 */ aaaaaa);"); } TEST_F(FormatTest, CommentsInStaticInitializers) { |