TEST(WRITES(pb_encode(&s, CallbackContainerContainer_fields, &msg2),
"\x0A\x04\x0A\x02\x08\x55"))
TEST(WRITES(pb_encode(&s, CallbackContainerContainer_fields, &msg2),
"\x0A\x04\x0A\x02\x08\x55"))
- /* Misbehaving callback */
+ /* Misbehaving callback: varying output between calls */
msg.submsg.data.funcs.encode = &crazyfieldcallback;
msg.submsg.data.arg = &state;
msg2.submsg.submsg.data.funcs.encode = &crazyfieldcallback;
msg.submsg.data.funcs.encode = &crazyfieldcallback;
msg.submsg.data.arg = &state;
msg2.submsg.submsg.data.funcs.encode = &crazyfieldcallback;
#include <stdio.h>
#include <pb_decode.h>
#include <stdio.h>
#include <pb_decode.h>
bool print_person(pb_istream_t *stream)
{
bool print_person(pb_istream_t *stream)
{
#include <stdio.h>
#include <pb_encode.h>
#include <stdio.h>
#include <pb_encode.h>
bool streamcallback(pb_ostream_t *stream, const uint8_t *buf, size_t count)
{
bool streamcallback(pb_ostream_t *stream, const uint8_t *buf, size_t count)
{