diff options
Diffstat (limited to 'clang/unittests/Format/SortIncludesTest.cpp')
-rw-r--r-- | clang/unittests/Format/SortIncludesTest.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/unittests/Format/SortIncludesTest.cpp b/clang/unittests/Format/SortIncludesTest.cpp index ce83091b715..d96227d13ee 100644 --- a/clang/unittests/Format/SortIncludesTest.cpp +++ b/clang/unittests/Format/SortIncludesTest.cpp @@ -191,6 +191,19 @@ TEST_F(SortIncludesTest, LeavesMainHeaderFirst) { "#include \"c.h\"\n" "#include \"b.h\"\n", "a.h")); + + // Only do this in the first #include block. + EXPECT_EQ("#include <a>\n" + "\n" + "#include \"b.h\"\n" + "#include \"c.h\"\n" + "#include \"llvm/a.h\"\n", + sort("#include <a>\n" + "\n" + "#include \"llvm/a.h\"\n" + "#include \"c.h\"\n" + "#include \"b.h\"\n", + "a.cc")); } TEST_F(SortIncludesTest, NegativePriorities) { |