diff options
| author | Nico Weber <nicolasweber@gmx.de> | 2015-10-19 01:36:09 +0000 |
|---|---|---|
| committer | Nico Weber <nicolasweber@gmx.de> | 2015-10-19 01:36:09 +0000 |
| commit | afa62fae1e143f9fa2b8ff5db30bc36fc63af993 (patch) | |
| tree | 632e70e2f452736ef976e2581ee6fa3261643688 /clang/unittests/Format | |
| parent | 7f66d75832479ec7ee6b4903a95b9fb66289f543 (diff) | |
| download | bcm5719-llvm-afa62fae1e143f9fa2b8ff5db30bc36fc63af993.tar.gz bcm5719-llvm-afa62fae1e143f9fa2b8ff5db30bc36fc63af993.zip | |
clang-format: Extend main header include sorting heuristic to Objective-C files.
llvm-svn: 250675
Diffstat (limited to 'clang/unittests/Format')
| -rw-r--r-- | clang/unittests/Format/SortIncludesTest.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/unittests/Format/SortIncludesTest.cpp b/clang/unittests/Format/SortIncludesTest.cpp index 8908eb92a56..36c8351810e 100644 --- a/clang/unittests/Format/SortIncludesTest.cpp +++ b/clang/unittests/Format/SortIncludesTest.cpp @@ -122,6 +122,13 @@ TEST_F(SortIncludesTest, LeavesMainHeaderFirst) { sort("#include \"llvm/a.h\"\n" "#include \"c.h\"\n" "#include \"b.h\"\n")); + EXPECT_EQ("#include \"llvm/a.h\"\n" + "#include \"b.h\"\n" + "#include \"c.h\"\n", + sort("#include \"llvm/a.h\"\n" + "#include \"c.h\"\n" + "#include \"b.h\"\n", + "input.mm")); // Don't do this in headers. EXPECT_EQ("#include \"b.h\"\n" |

