diff options
author | Daniel Jasper <djasper@google.com> | 2013-02-06 22:04:05 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2013-02-06 22:04:05 +0000 |
commit | 474e46211a141e4566c399b80ae26e3580b70c90 (patch) | |
tree | 8aaa3be083dd0ad190233c435583a569fe552035 /unittests/Format/FormatTest.cpp | |
parent | 4e8a7b4a95962f63a938c0d21c9aca0a51b78345 (diff) |
Fix bug in the alignment of comments.
Before:
const char *test[] = {
// A
"aaaa",
// B
"aaaaa",
};
After:
const char *test[] = {
// A
"aaaa",
// B
"aaaaa",
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174549 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 160126ba3d..10742a2609 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -485,6 +485,13 @@ TEST_F(FormatTest, UnderstandsSingleLineComments) { " parameter));"); verifyGoogleFormat("#endif // HEADER_GUARD"); + + verifyFormat("const char *test[] = {\n" + " // A\n" + " \"aaaa\",\n" + " // B\n" + " \"aaaaa\",\n" + "};"); } TEST_F(FormatTest, UnderstandsMultiLineComments) { |