blob: 30055808ae9e2268ec3a8d8032f3769d3c5a1495 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
/* Minimal test with all headers generated into a single file. */
#include "monster_test.h"
int main(int argc, char *argv[])
{
int ret;
void *buf;
size_t size;
flatcc_builder_t builder, *B;
(void)argc;
(void)argv;
B = &builder;
flatcc_builder_init(B);
MyGame_Example_Monster_start_as_root(B);
MyGame_Example_Monster_name_create_str(B, "MyMonster");
MyGame_Example_Monster_end_as_root(B);
buf = flatcc_builder_get_direct_buffer(B, &size);
ret = MyGame_Example_Monster_verify_as_root(buf, size);
flatcc_builder_clear(B);
return ret;
}
|