diff options
author | Krasimir Georgiev <krasimir@google.com> | 2017-07-06 13:58:29 +0000 |
---|---|---|
committer | Krasimir Georgiev <krasimir@google.com> | 2017-07-06 13:58:29 +0000 |
commit | da0b9bb7b03533a4855a395a83a098fecf3f6556 (patch) | |
tree | 44ae4ac4544d83916fa8b24940f8c8aa180e685b /unittests/Format/FormatTestProto.cpp | |
parent | f7e486629c1484d91197739790471f291d36867c (diff) | |
download | clang-da0b9bb7b03533a4855a395a83a098fecf3f6556.tar.gz |
[clang-format] Add space between a message field key and the opening bracket in proto messages
Summary:
This patch updates the formatting of message fields of type `a{...}` to `a {...}`
for proto messages.
Reviewers: djasper
Reviewed By: djasper
Subscribers: klimek, cfe-commits
Differential Revision: https://reviews.llvm.org/D35015
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Format/FormatTestProto.cpp')
-rw-r--r-- | unittests/Format/FormatTestProto.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/unittests/Format/FormatTestProto.cpp b/unittests/Format/FormatTestProto.cpp index 2e3b9311d1..639da87c6e 100644 --- a/unittests/Format/FormatTestProto.cpp +++ b/unittests/Format/FormatTestProto.cpp @@ -199,11 +199,11 @@ TEST_F(FormatTestProto, FormatsOptions) { "};"); verifyFormat("option (MyProto.options) = {\n" " field_c: \"OK\"\n" - " msg_field{field_d: 123}\n" + " msg_field {field_d: 123}\n" "};"); verifyFormat("option (MyProto.options) = {\n" " field_a: OK\n" - " field_b{field_c: OK}\n" + " field_b {field_c: OK}\n" " field_d: OKOKOK\n" " field_e: OK\n" "}"); @@ -216,7 +216,7 @@ TEST_F(FormatTestProto, FormatsOptions) { verifyFormat("option (MyProto.options) = {\n" " field_a: OK\n" - " field_b<field_c: OK>\n" + " field_b <field_c: OK>\n" " field_d: OKOKOK\n" " field_e: OK\n" "}"); @@ -255,7 +255,7 @@ TEST_F(FormatTestProto, FormatsOptions) { verifyFormat("option (MyProto.options) = <\n" " field_a: \"OK\"\n" - " msg_field<\n" + " msg_field <\n" " field_b: OK\n" " field_c: OK\n" " field_d: OK\n" @@ -267,7 +267,7 @@ TEST_F(FormatTestProto, FormatsOptions) { verifyFormat("option (MyProto.options) = <\n" " field_a: \"OK\"\n" - " msg_field<\n" + " msg_field <\n" " field_b: OK,\n" " field_c: OK,\n" " field_d: OK,\n" @@ -303,7 +303,7 @@ TEST_F(FormatTestProto, FormatsOptions) { verifyFormat("option (MyProto.options) = <\n" " field_a: \"OK\"\n" - " msg_field{\n" + " msg_field {\n" " field_b: OK\n" " field_c: OK\n" " field_d: OK\n" @@ -315,7 +315,7 @@ TEST_F(FormatTestProto, FormatsOptions) { verifyFormat("option (MyProto.options) = {\n" " field_a: \"OK\"\n" - " msg_field<\n" + " msg_field <\n" " field_b: OK\n" " field_c: OK\n" " field_d: OK\n" @@ -339,18 +339,18 @@ TEST_F(FormatTestProto, FormatsOptions) { verifyFormat("option (MyProto.options) = <\n" " field_a: \"OK\"\n" - " msg_field{\n" + " msg_field {\n" " field_b: OK\n" " field_c: OK\n" " field_d: OK\n" - " msg_field<\n" + " msg_field <\n" " field_A: 1\n" " field_B: 2\n" " field_C: 3\n" " field_D: 4\n" " field_E: 5\n" " >\n" - " msg_field<field_A: 1 field_B: 2 field_C: 3 field_D: 4>\n" + " msg_field <field_A: 1 field_B: 2 field_C: 3 field_D: 4>\n" " field_e: OK\n" " field_f: OK\n" " }\n" |