6#include "pio_with_options.pb.h"
17 TestMessageWithOptions original = TestMessageWithOptions_init_zero;
18 strcpy(original.str,
"Hello");
22 TEST(
pb_encode(&ostream, &TestMessageWithOptions_msg, &original));
24 written = ostream.bytes_written;
28 TestMessageWithOptions decoded = TestMessageWithOptions_init_zero;
30 TEST(
pb_decode(&istream, &TestMessageWithOptions_msg, &decoded));
MOSAPI char * strcpy(char *__restrict dest, const char *__restrict src)
MOSAPI s32 strcmp(const char *str1, const char *str2)
bool pb_decode(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct)
pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t msglen)
pb_ostream_t pb_ostream_from_buffer(pb_byte_t *buf, size_t bufsize)
bool pb_encode(pb_ostream_t *stream, const pb_msgdesc_t *fields, const void *src_struct)