SIGN IN SIGN UP

Protocol Buffers - Google's data interchange format

0 0 35 C++

[ObjC] Fix some tests to not violate GPBCodedOutputStream invariants.

If the class is writing to an NSOutputStream, the buffer must always
be used to batch things up. The tests were accidentally making a zero
length buffer which isn't valid.

Fix the tests to not do this.

Make the core code assert in debug to ensure the invariant can't be
broken.

PiperOrigin-RevId: 817153199
T
Thomas Van Lenten committed
d4bef77490bd91d4e8c973735bf2486605461bdc
Parent: c3ddacb
Committed by Copybara-Service <copybara-worker@google.com> on 10/9/2025, 1:17:35 PM