repro.c 379 B

12345678910111213141516
  1. #include <pb_decode.h>
  2. #include <unittests.h>
  3. #include <malloc_wrappers.h>
  4. #include "repro.pb.h"
  5. int main() {
  6. const uint8_t data[] = {0x08, 0x08, 0x2d};
  7. int status = 0;
  8. Repro repro = Repro_init_zero;
  9. pb_istream_t stream = pb_istream_from_buffer(data, sizeof(data));
  10. TEST(!pb_decode(&stream, Repro_fields, &repro));
  11. TEST(get_alloc_count() == 0);
  12. return status;
  13. }