From 62702b6cb1647be8c2222c419c076017d9b47e9a Mon Sep 17 00:00:00 2001 From: Joshua Haberman Date: Sun, 9 Jan 2022 22:39:18 -0800 Subject: [PATCH] Matched text format for maps. --- python/pb_unit_tests/text_format_test_wrapper.py | 1 - upb/text_encode.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/python/pb_unit_tests/text_format_test_wrapper.py b/python/pb_unit_tests/text_format_test_wrapper.py index d418fecbee..b8cf207b62 100644 --- a/python/pb_unit_tests/text_format_test_wrapper.py +++ b/python/pb_unit_tests/text_format_test_wrapper.py @@ -29,7 +29,6 @@ from google.protobuf.internal import _parameterized sep = _parameterized._SEPARATOR -text_format_test.OnlyWorksWithProto2RightNowTests.testPrintMapUsingCppImplementation.__unittest_expecting_failure__ = True text_format_test.OnlyWorksWithProto2RightNowTests.testPrintUnknownFields.__unittest_expecting_failure__ = True getattr(text_format_test.TextFormatMessageToStringTests, "testPrintUnknownFieldsEmbeddedMessageInBytes" + sep + "0").__unittest_expecting_failure__ = True getattr(text_format_test.TextFormatMessageToStringTests, "testPrintUnknownFieldsEmbeddedMessageInBytes" + sep + "1").__unittest_expecting_failure__ = True diff --git a/upb/text_encode.c b/upb/text_encode.c index 09d0f21f86..d130d666da 100644 --- a/upb/text_encode.c +++ b/upb/text_encode.c @@ -230,7 +230,7 @@ static void txtenc_mapentry(txtenc *e, upb_msgval key, upb_msgval val, const upb_fielddef *key_f = upb_msgdef_field(entry, 0); const upb_fielddef *val_f = upb_msgdef_field(entry, 1); txtenc_indent(e); - txtenc_printf(e, "%s: {", upb_fielddef_name(f)); + txtenc_printf(e, "%s {", upb_fielddef_name(f)); txtenc_endfield(e); e->indent_depth++;