summaryrefslogtreecommitdiffstats
path: root/unittests
diff options
context:
space:
mode:
authorDaniel Jasper <djasper@google.com>2016-06-23 09:40:19 +0000
committerDaniel Jasper <djasper@google.com>2016-06-23 09:40:19 +0000
commitcc368efa9ed0a97d7a23218b28a1a226ca38aa60 (patch)
tree8c18139ebfec48aea74d655db65e4e33ffe17f74 /unittests
parent1465a35ad31e4da111eca54c7b09abf6f71f90f9 (diff)
clang-format: [Proto] Use more compact format for text-formatted options
Before: enum Type { UNKNOWN = 0 [(some_options) = { a: aa, b: bb }]; }; After: enum Type { UNKNOWN = 0 [(some_options) = {a: aa, b: bb}]; }; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@273553 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests')
-rw-r--r--unittests/Format/FormatTestProto.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/unittests/Format/FormatTestProto.cpp b/unittests/Format/FormatTestProto.cpp
index 2580f7fb8c..d9fb140913 100644
--- a/unittests/Format/FormatTestProto.cpp
+++ b/unittests/Format/FormatTestProto.cpp
@@ -74,8 +74,11 @@ TEST_F(FormatTestProto, FormatsEnums) {
" TYPE_B = 2;\n"
"};");
verifyFormat("enum Type {\n"
+ " UNKNOWN = 0 [(some_options) = {a: aa, b: bb}];\n"
+ "};");
+ verifyFormat("enum Type {\n"
" UNKNOWN = 0 [(some_options) = {\n"
- " a: aa,\n"
+ " a: aa, // wrap\n"
" b: bb\n"
" }];\n"
"};");
@@ -153,10 +156,7 @@ TEST_F(FormatTestProto, FormatsOptions) {
" field_a: OK\n"
" field_b: \"OK\"\n"
" field_c: \"OK\"\n"
- " msg_field: {\n"
- " field_d: 123\n"
- " field_e: OK\n"
- " }\n"
+ " msg_field: {field_d: 123 field_e: OK}\n"
"};");
verifyFormat("option (MyProto.options) = {\n"
" field_a: OK // Comment\n"