diff options
Diffstat (limited to 'unittests/Format/FormatTestTextProto.cpp')
-rw-r--r-- | unittests/Format/FormatTestTextProto.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/unittests/Format/FormatTestTextProto.cpp b/unittests/Format/FormatTestTextProto.cpp index 2de7e181f2cb..0a7bcdd82362 100644 --- a/unittests/Format/FormatTestTextProto.cpp +++ b/unittests/Format/FormatTestTextProto.cpp @@ -245,6 +245,50 @@ TEST_F(FormatTestTextProto, SupportsAngleBracketMessageFields) { ">\n" "field: OK,\n" "field_c <field <field <>>>"); + + verifyFormat("app_id: 'com.javax.swing.salsa.latino'\n" + "head_id: 1\n" + "data <key: value>"); + + verifyFormat("app_id: 'com.javax.swing.salsa.latino'\n" + "head_id: 1\n" + "data <key: value>\n" + "tail_id: 2"); + + verifyFormat("app_id: 'com.javax.swing.salsa.latino'\n" + "head_id: 1\n" + "data <key: value>\n" + "data {key: value}"); + + verifyFormat("app {\n" + " app_id: 'com.javax.swing.salsa.latino'\n" + " head_id: 1\n" + " data <key: value>\n" + "}"); + + verifyFormat("app: {\n" + " app_id: 'com.javax.swing.salsa.latino'\n" + " head_id: 1\n" + " data <key: value>\n" + "}"); + + verifyFormat("app_id: 'com.javax.swing.salsa.latino'\n" + "headheadheadheadheadhead_id: 1\n" + "product_data {product {1}}"); + + verifyFormat("app_id: 'com.javax.swing.salsa.latino'\n" + "headheadheadheadheadhead_id: 1\n" + "product_data <product {1}>"); + + verifyFormat("app_id: 'com.javax.swing.salsa.latino'\n" + "headheadheadheadheadhead_id: 1\n" + "product_data <product <1>>"); + + verifyFormat("app <\n" + " app_id: 'com.javax.swing.salsa.latino'\n" + " headheadheadheadheadhead_id: 1\n" + " product_data <product {1}>\n" + ">"); } } // end namespace tooling } // end namespace clang |