diff options
Diffstat (limited to 'clang/unittests/Format/FormatTestProto.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestProto.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp index d3d3d42aa84..68d724981ce 100644 --- a/clang/unittests/Format/FormatTestProto.cpp +++ b/clang/unittests/Format/FormatTestProto.cpp @@ -189,5 +189,20 @@ TEST_F(FormatTestProto, ExtendingMessage) { "}"); } +TEST_F(FormatTestProto, FormatsImports) { + verifyFormat("import \"a.proto\";\n" + "import \"b.proto\";\n" + "// comment\n" + "message A {\n" + "}"); + + // Missing semicolons should not confuse clang-format. + verifyFormat("import \"a.proto\"\n" + "import \"b.proto\"\n" + "// comment\n" + "message A {\n" + "}"); +} + } // end namespace tooling } // end namespace clang |