diff options
author | Daniel Jasper <djasper@google.com> | 2014-06-10 10:42:26 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2014-06-10 10:42:26 +0000 |
commit | ff8776e01383fde7a7ba7b59d879914b44df5cea (patch) | |
tree | 897677cf6f80923cbd5525758686dacc56d09936 /unittests | |
parent | e451a7e7601d25bcad758bc8efd1cdeb6579254b (diff) | |
download | clang-ff8776e01383fde7a7ba7b59d879914b44df5cea.tar.gz |
clang-format: Fix enum formatting with specific comment.
Before:
enum Fruit { //
APPLE,
PEAR };
After:
enum Fruit { //
APPLE,
PEAR
};
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210522 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index 02636a7016..baf05a9b74 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -1900,6 +1900,10 @@ TEST_F(FormatTest, FormatsEnum) { "\n" " THREE\n" "}")); + verifyFormat("enum E { // comment\n" + " ONE,\n" + " TWO\n" + "};"); } TEST_F(FormatTest, FormatsEnumsWithErrors) { @@ -5410,7 +5414,8 @@ TEST_F(FormatTest, LayoutCxx11BraceInitializers) { " BracedList{ // comment 1 (Forcing interesting break)\n" " param1, param2,\n" " // comment 2\n" - " param3, param4 });", + " param3, param4\n" + " });", ExtraSpaces); verifyFormat( "std::this_thread::sleep_for(\n" |