diff options
Diffstat (limited to 'unittests/Format/FormatTestSelective.cpp')
-rw-r--r-- | unittests/Format/FormatTestSelective.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestSelective.cpp b/unittests/Format/FormatTestSelective.cpp index 9ee87b34c2171..182218fe96dbe 100644 --- a/unittests/Format/FormatTestSelective.cpp +++ b/unittests/Format/FormatTestSelective.cpp @@ -530,6 +530,14 @@ TEST_F(FormatTestSelective, SelectivelyRequoteJavaScript) { 20, 0)); } +TEST_F(FormatTestSelective, KeepsIndentAfterCommentSectionImport) { + std::string Code = "#include <a> // line 1\n" // 23 chars long + " // line 2\n" // 23 chars long + "\n" // this newline is char 47 + "int i;"; // this line is not indented + EXPECT_EQ(Code, format(Code, 47, 1)); +} + } // end namespace } // end namespace format } // end namespace clang |