diff options
| author | Krasimir Georgiev <krasimir@google.com> | 2019-04-04 14:04:26 +0000 |
|---|---|---|
| committer | Krasimir Georgiev <krasimir@google.com> | 2019-04-04 14:04:26 +0000 |
| commit | 00e7ae9f80cc9f8d4792b96bbc0f2a964b939b32 (patch) | |
| tree | 14d6da5f05f7e0d931624fa13e0aa8b4358f08ad /clang/unittests/Format | |
| parent | eefa343df559ccee9a855f2491bc1c46ea8c0c59 (diff) | |
| download | bcm5719-llvm-00e7ae9f80cc9f8d4792b96bbc0f2a964b939b32.tar.gz bcm5719-llvm-00e7ae9f80cc9f8d4792b96bbc0f2a964b939b32.zip | |
[clang-format] Preserve include blocks in ObjC Google style
Summary:
r357567 started to regroup include block for Google style; it was meant to apply
only for C++. This patch reverts this for ObjC.
Reviewers: ioeric
Reviewed By: ioeric
Subscribers: thakis, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D60263
llvm-svn: 357695
Diffstat (limited to 'clang/unittests/Format')
| -rw-r--r-- | clang/unittests/Format/SortIncludesTest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/unittests/Format/SortIncludesTest.cpp b/clang/unittests/Format/SortIncludesTest.cpp index 7153e5eecac..c00d3cb747d 100644 --- a/clang/unittests/Format/SortIncludesTest.cpp +++ b/clang/unittests/Format/SortIncludesTest.cpp @@ -653,6 +653,18 @@ TEST_F(SortIncludesTest, DoNotOutputReplacementsForSortedBlocksWithRegrouping) { EXPECT_EQ(Code, sort(Code, "input.h", 0)); } + +TEST_F(SortIncludesTest, DoNotRegroupGroupsInGoogleObjCStyle) { + FmtStyle = getGoogleStyle(FormatStyle::LK_ObjC); + + EXPECT_EQ("#include <a.h>\n" + "#include <b.h>\n" + "#include \"a.h\"", + sort("#include <b.h>\n" + "#include <a.h>\n" + "#include \"a.h\"")); +} + } // end namespace } // end namespace format } // end namespace clang |

