diff options
author | Daniel Jasper <djasper@google.com> | 2013-03-01 16:45:59 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-03-01 16:45:59 +0000 |
commit | 812c045e591495b940f5a9102b146bb43b970e1f (patch) | |
tree | 9f29d30c9abb798daef8ba4960dda0b33def14c9 /unittests/Format/FormatTest.cpp | |
parent | bc30c71d20f05bc39b5dd73f06ee4dede9c55710 (diff) |
Remove trailing whitespace of line comments.
This fixed llvm.org/PR15378.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176351 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 8b1f69a76e..052c852a63 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -537,6 +537,13 @@ TEST_F(FormatTest, UnderstandsSingleLineComments) { " aaaaaaaaaaaaaaaaaaaaaa); // 81 cols with this comment"); } +TEST_F(FormatTest, RemovesTrailingWhitespaceOfComments) { + EXPECT_EQ("// comment", format("// comment ")); + EXPECT_EQ("int aaaaaaa, bbbbbbb; // comment", + format("int aaaaaaa, bbbbbbb; // comment ", + getLLVMStyleWithColumns(33))); +} + TEST_F(FormatTest, UnderstandsMultiLineComments) { verifyFormat("f(/*test=*/ true);"); EXPECT_EQ( |