mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
fix missed oom handling in unset required
PiperOrigin-RevId: 956610684
This commit is contained in:
parent
706656afeb
commit
2a36520396
5 changed files with 70 additions and 16 deletions
|
|
@ -85,10 +85,21 @@ class MessageTest(unittest.TestCase):
|
|||
_ = msg3.SerializePartialToString()
|
||||
_ = msg3.ListFields()
|
||||
_ = msg3.DiscardUnknownFields()
|
||||
_ = msg3.FindInitializationErrors()
|
||||
|
||||
msg4 = message_module.TestAllTypes()
|
||||
msg4.CopyFrom(msg3)
|
||||
|
||||
# Try deepcopy
|
||||
_ = copy.deepcopy(msg3)
|
||||
|
||||
# Try other upb message APIs
|
||||
_ = msg3.ByteSize()
|
||||
_ = msg3.SerializePartialToString()
|
||||
_ = msg3.ListFields()
|
||||
_ = msg3.FindInitializationErrors()
|
||||
_ = msg3.DiscardUnknownFields()
|
||||
|
||||
if hasattr(message_module, 'TestAllExtensions'):
|
||||
ext_msg = message_module.TestAllExtensions()
|
||||
test_util.SetAllExtensions(ext_msg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue