diff options
author | Krasimir Georgiev <krasimir@google.com> | 2018-02-13 10:20:39 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2018-02-13 10:20:39 +0000 |
commit | a9de5f6b28931eab59bca3c566e135195cb291ce (patch) | |
tree | b3972c767398225e3e688b2c9a7aad7cc8fea879 /unittests/Format/FormatTestProto.cpp | |
parent | 49130330ae220213d7fd8e480f6b8914d70b42b1 (diff) | |
download | clang-a9de5f6b28931eab59bca3c566e135195cb291ce.tar.gz |
[clang-format] Support text proto extensions
Summary:
This adds support for text proto extensions, like:
```
msg {
[type.type/ext] {
key: value
}
}
```
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D43180
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTestProto.cpp')
-rw-r--r-- | unittests/Format/FormatTestProto.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestProto.cpp b/unittests/Format/FormatTestProto.cpp index d667ec2b3e..27ecde7f34 100644 --- a/unittests/Format/FormatTestProto.cpp +++ b/unittests/Format/FormatTestProto.cpp @@ -421,5 +421,16 @@ TEST_F(FormatTestProto, KeepsLongStringLiteralsOnSameLine) { "}"); } +TEST_F(FormatTestProto, FormatsOptionsExtensions) { + verifyFormat("option (MyProto.options) = {\n" + " msg_field: { field_d: 123 }\n" + " [ext.t/u] { key: value }\n" + " key: value\n" + " [t.u/v] <\n" + " [ext] { key: value }\n" + " >\n" + "};"); +} + } // end namespace tooling } // end namespace clang |