diff options
author | Daniel Jasper <djasper@google.com> | 2016-06-23 09:40:19 +0000 |
---|---|---|
committer | Daniel Jasper <djasper@google.com> | 2016-06-23 09:40:19 +0000 |
commit | 7f3b99fca7f21e3dfde40f376d27ff769adda8d8 (patch) | |
tree | ea4913bf614043ae7656b3d387c22c699504812b /clang/unittests/Format/FormatTestProto.cpp | |
parent | e6ca7b6a6b1a979f5d48b294e5a047ed68467b63 (diff) | |
download | bcm5719-llvm-7f3b99fca7f21e3dfde40f376d27ff769adda8d8.tar.gz bcm5719-llvm-7f3b99fca7f21e3dfde40f376d27ff769adda8d8.zip |
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
Diffstat (limited to 'clang/unittests/Format/FormatTestProto.cpp')
-rw-r--r-- | clang/unittests/Format/FormatTestProto.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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 @@ -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" |