diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-04 07:32:14 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-04 07:32:14 +0000 |
commit | 1f140981b6af0c8cf0455a9999707a837de071ad (patch) | |
tree | e35914e3eb2c2e14d7ee469bfa6bffacc8fa415f /clang/unittests/Format/FormatTest.cpp | |
parent | f7f13c0ef288841f3695f825302e39dc0fb6f088 (diff) | |
download | bcm5719-llvm-1f140981b6af0c8cf0455a9999707a837de071ad.tar.gz bcm5719-llvm-1f140981b6af0c8cf0455a9999707a837de071ad.zip |
Improve handling of trailing block comments.
We can now (even in non-bin-packing modes) format:
someFunction(1, /* comment 1 */
2, /* comment 2 */
3, /* comment 3 */
aaa);
llvm-svn: 174309
Diffstat (limited to 'clang/unittests/Format/FormatTest.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTest.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTest.cpp b/clang/unittests/Format/FormatTest.cpp index 28d19d5ac51..17a8dc48abb 100644 --- a/clang/unittests/Format/FormatTest.cpp +++ b/clang/unittests/Format/FormatTest.cpp @@ -1908,6 +1908,15 @@ TEST_F(FormatTest, BlockComments) { " parameter);", format("#define A\n" "/* */someCall(parameter);", getLLVMStyleWithColumns(15))); + + EXPECT_EQ("someFunction(1, /* comment 1 */\n" + " 2, /* comment 2 */\n" + " 3, /* comment 3 */\n" + " aaaa);", + format("someFunction (1, /* comment 1 */\n" + " 2, /* comment 2 */ \n" + " 3, /* comment 3 */\n" + "aaaa );", getGoogleStyle())); } TEST_F(FormatTest, FormatStarDependingOnContext) { |