diff options
author | Nico Weber <nicolasweber@gmx.de> | 2012-12-21 18:21:56 +0000 |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2012-12-21 18:21:56 +0000 |
commit | b23ae0c5104a4fec4c2ff603143fe142ec409249 (patch) | |
tree | 2da3fe03e2b2ebb0d0f96650d862caacd1b121f6 /unittests/Format/FormatTest.cpp | |
parent | d29b45580a5ffa5318cbe69b619d4d36ff7f8c78 (diff) |
format: Handle #import as include directive too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170914 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTest.cpp')
-rw-r--r-- | unittests/Format/FormatTest.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unittests/Format/FormatTest.cpp b/unittests/Format/FormatTest.cpp index a08f7c6cf7..b33206b404 100644 --- a/unittests/Format/FormatTest.cpp +++ b/unittests/Format/FormatTest.cpp @@ -617,6 +617,12 @@ TEST_F(FormatTest, HandlesIncludeDirectives) { EXPECT_EQ("#include \"a/b/string\"\n", format("#include \"a/b/string\"\n")); EXPECT_EQ("#include \"string.h\"\n", format("#include \"string.h\"\n")); EXPECT_EQ("#include \"string.h\"\n", format("#include \"string.h\"\n")); + + EXPECT_EQ("#import <string>\n", format("#import <string>\n")); + EXPECT_EQ("#import <a/b/c.h>\n", format("#import <a/b/c.h>\n")); + EXPECT_EQ("#import \"a/b/string\"\n", format("#import \"a/b/string\"\n")); + EXPECT_EQ("#import \"string.h\"\n", format("#import \"string.h\"\n")); + EXPECT_EQ("#import \"string.h\"\n", format("#import \"string.h\"\n")); } |