aboutsummaryrefslogtreecommitdiff
path: root/unittests/Format/FormatTest.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2013-02-04 07:32:14 +0000
committerDaniel Jasper <djasper@google.com>2013-02-04 07:32:14 +0000
commit2752ff35854b295837b8088e44d5a932be60e107 (patch)
tree14651849ce8cd0a36f00d0e8eaa2879f6cb718fd /unittests/Format/FormatTest.cpp
parent8159d2f271c9142b46a672ac2c45821911171a7d (diff)
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); git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174309 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r--unittests/Format/FormatTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp
index 28d19d5ac5..17a8dc48ab 100644
--- a/unittests/Format/FormatTest.cpp
+++ b/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) {