MOS Source Code
Loading...
Searching...
No Matches
repro.c
Go to the documentation of this file.
1
#include <pb_decode.h>
2
#include <
unittests.h
>
3
#include <
malloc_wrappers.h
>
4
#include "repro.pb.h"
5
6
int
main
() {
7
const
uint8_t
data[] = {0x08, 0x08, 0x2d};
8
int
status = 0;
9
Repro repro = Repro_init_zero;
10
11
pb_istream_t stream =
pb_istream_from_buffer
(data,
sizeof
(data));
12
TEST
(!
pb_decode
(&stream, Repro_fields, &repro));
13
TEST
(
get_alloc_count
() == 0);
14
15
return
status;
16
}
get_alloc_count
size_t get_alloc_count()
Definition
malloc_wrappers.c:162
malloc_wrappers.h
pb_decode
bool pb_decode(pb_istream_t *stream, const pb_msgdesc_t *fields, void *dest_struct)
Definition
pb_decode.c:1182
pb_istream_from_buffer
pb_istream_t pb_istream_from_buffer(const pb_byte_t *buf, size_t msglen)
Definition
pb_decode.c:143
uint8_t
unsigned char uint8_t
Definition
pb_syshdr.h:20
main
int main()
Definition
repro.c:6
TEST
#define TEST(x)
Definition
test.h:3
unittests.h
libs
nanopb
nanopb
tests
regression
issue_647
repro.c
Generated on Sun Sep 1 2024 18:22:52 for MOS Source Code by
1.12.0