summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestProto.cpp
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-01-04 07:28:12 +0000
committerDaniel Jasper <djasper@google.com>2016-01-04 07:28:12 +0000
commitffbad0e8aa36c7e0cc7026a989b21177dc1fb255 (patch)
treec2a09e88442cd7ad938ba53cc1af6bfd6bcfdc0e /clang/unittests/Format/FormatTestProto.cpp
parentccff4d1e60ceda9bd295116596029c0537033dbf (diff)
downloadbcm5719-llvm-ffbad0e8aa36c7e0cc7026a989b21177dc1fb255.tar.gz
bcm5719-llvm-ffbad0e8aa36c7e0cc7026a989b21177dc1fb255.zip
clang-format: [Proto] Basic support for options with <> for repeated fields.
llvm-svn: 256737
Diffstat (limited to 'clang/unittests/Format/FormatTestProto.cpp')
-rw-r--r--clang/unittests/Format/FormatTestProto.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp
index 6580443a021..d3d3d42aa84 100644
--- a/clang/unittests/Format/FormatTestProto.cpp
+++ b/clang/unittests/Format/FormatTestProto.cpp
@@ -168,6 +168,12 @@ TEST_F(FormatTestProto, FormatsOptions) {
" field_c: \"OK\"\n"
" msg_field{field_d: 123}\n"
"};");
+
+ // Support syntax with <> instead of {}.
+ verifyFormat("option (MyProto.options) = {\n"
+ " field_c: \"OK\",\n"
+ " msg_field: <field_d: 123>\n"
+ "};");
}
TEST_F(FormatTestProto, FormatsService) {
OpenPOWER on IntegriCloud