summaryrefslogtreecommitdiffstats
path: root/clang/unittests/Format/FormatTestProto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/unittests/Format/FormatTestProto.cpp')
-rw-r--r--clang/unittests/Format/FormatTestProto.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/clang/unittests/Format/FormatTestProto.cpp b/clang/unittests/Format/FormatTestProto.cpp
index 4d52a61dc3f..3889bc67766 100644
--- a/clang/unittests/Format/FormatTestProto.cpp
+++ b/clang/unittests/Format/FormatTestProto.cpp
@@ -211,12 +211,14 @@ TEST_F(FormatTestProto, FormatsOptions) {
// Support syntax with <> instead of {}.
verifyFormat("option (MyProto.options) = {\n"
" field_c: \"OK\",\n"
- " msg_field: <field_d: 123>\n"
+ " msg_field: < field_d: 123 >\n"
+ " empty: <>\n"
+ " empty <>\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"
"}");
@@ -224,9 +226,9 @@ TEST_F(FormatTestProto, FormatsOptions) {
verifyFormat("option (MyProto.options) = {\n"
" msg_field: <>\n"
" field_c: \"OK\",\n"
- " msg_field: <field_d: 123>\n"
+ " msg_field: < field_d: 123 >\n"
" field_e: OK\n"
- " msg_field: <field_d: 12>\n"
+ " msg_field: < field_d: 12 >\n"
"};");
verifyFormat("option (MyProto.options) = <\n"
@@ -350,7 +352,7 @@ TEST_F(FormatTestProto, FormatsOptions) {
" 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 f_D: 4 >\n"
" field_e: OK\n"
" field_f: OK\n"
" }\n"
@@ -358,14 +360,14 @@ TEST_F(FormatTestProto, FormatsOptions) {
">;");
verifyFormat("option (MyProto.options) = <\n"
- " data1 <key1: value1>\n"
+ " data1 < key1: value1 >\n"
" data2 { key2: value2 }\n"
">;");
verifyFormat("option (MyProto.options) = <\n"
" app_id: 'com.javax.swing.salsa.latino'\n"
" head_id: 1\n"
- " data <key: value>\n"
+ " data < key: value >\n"
">;");
verifyFormat("option (MyProto.options) = {\n"
OpenPOWER on IntegriCloud