From 7f3b99fca7f21e3dfde40f376d27ff769adda8d8 Mon Sep 17 00:00:00 2001 From: Daniel Jasper Date: Thu, 23 Jun 2016 09:40:19 +0000 Subject: 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}]; }; llvm-svn: 273553 --- clang/unittests/Format/FormatTestProto.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'clang/unittests/Format/FormatTestProto.cpp') diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp index 2580f7fb8c0..d9fb1409139 100644 --- a/clang/unittests/Format/FormatTestProto.cpp +++ b/clang/unittests/Format/FormatTestProto.cpp @@ -73,9 +73,12 @@ TEST_F(FormatTestProto, FormatsEnums) { " TYPE_A = 1;\n" " 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" -- cgit v1.2.3