summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestProto.cpp
diff options
context:
space:
mode:
authorKrasimir Georgiev <krasimir@google.com>2017-07-06 13:58:29 +0000
committerKrasimir Georgiev <krasimir@google.com>2017-07-06 13:58:29 +0000
commit47f21ef2af0a2ebfbf99a3e926577c35cc508bfd (patch)
treeee3e86ee83c39a59c61cd544f735442109cef162 /clang/unittests/Format/FormatTestProto.cpp
parent761e5b9310c8ca101c26909a24c440bfc69bf827 (diff)
downloadbcm5719-llvm-47f21ef2af0a2ebfbf99a3e926577c35cc508bfd.tar.gz
bcm5719-llvm-47f21ef2af0a2ebfbf99a3e926577c35cc508bfd.zip
[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 llvm-svn: 307261
Diffstat (limited to 'clang/unittests/Format/FormatTestProto.cpp')
-rw-r--r--clang/unittests/Format/FormatTestProto.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp
index 2e3b9311d12..639da87c6ea 100644
--- a/clang/unittests/Format/FormatTestProto.cpp
+++ b/clang/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"
OpenPOWER on IntegriCloud