aboutsummaryrefslogtreecommitdiff
path: root/flatcc/test/monster_test_prefix/monster_test_prefix.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2023-07-16 02:03:33 +0200
committerToni Uhlig <matzeton@googlemail.com>2023-07-16 02:03:33 +0200
commitb31e4bc16d1df62b50c6f77a77041f9e7b6c906d (patch)
tree024c74c13d918aa6bde302aab6836fa33607613c /flatcc/test/monster_test_prefix/monster_test_prefix.c
parentba6815ef8fb8ae472412b5af2837a7caba2799c2 (diff)
parent5a40295c4cf0af5ea8da9ced04a4ce7d3621a080 (diff)
Merge commit '5a40295c4cf0af5ea8da9ced04a4ce7d3621a080' as 'flatcc'
Diffstat (limited to 'flatcc/test/monster_test_prefix/monster_test_prefix.c')
-rw-r--r--flatcc/test/monster_test_prefix/monster_test_prefix.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/flatcc/test/monster_test_prefix/monster_test_prefix.c b/flatcc/test/monster_test_prefix/monster_test_prefix.c
new file mode 100644
index 0000000..bb070b2
--- /dev/null
+++ b/flatcc/test/monster_test_prefix/monster_test_prefix.c
@@ -0,0 +1,24 @@
+/* Minimal test with all headers generated into a single file. */
+#include "zzz_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);
+
+ zzz_MyGame_Example_Monster_start_as_root(B);
+ zzz_MyGame_Example_Monster_name_create_str(B, "MyMonster");
+ zzz_MyGame_Example_Monster_end_as_root(B);
+ buf = flatcc_builder_get_direct_buffer(B, &size);
+ ret = zzz_MyGame_Example_Monster_verify_as_root_with_identifier(buf, size, zzz_MyGame_Example_Monster_file_identifier);
+ flatcc_builder_clear(B);
+ return ret;
+}