blob: 9369bd1f0908fde6dc6e2030dc83048656048a7a [file] [log] [blame]
James Kuszmaulf5eb4682023-09-22 17:16:59 -07001include "aos/flatbuffers/test_dir/include.fbs";
2
3// TODO: test example with multiple namespaces per file.
4namespace aos.fbs.testing;
5
6struct SubStruct {
7 x:double;
8 y:double;
9}
10
11table SubTable {
12 foo:short (id: 0);
13 bar:short (id: 1, deprecated);
14 baz:float (id: 2);
15}
16
17attribute "static_length";
18attribute "static_vector_string_length";
19
20table TestTable {
21 scalar:int (id: 0);
22 vector_of_scalars:[int] (id: 1, static_length: 3);
23 string:string (id: 2, static_length: 20);
24 vector_of_strings:[string] (id: 3, static_length: 3, static_vector_string_length: 10);
25 substruct:SubStruct (id: 4);
26 subtable:SubTable (id: 5);
27 // The force-aligned vector is deliberately put in the middle of the table
28 // both by ID and alphabetically (both of these can affect the order in which
29 // certain things are evaluated, and during development there were some issues
30 // with this).
31 vector_aligned:[int] (id: 6, force_align: 64, static_length: 3);
32 vector_of_structs:[SubStruct] (id: 7, static_length: 3);
33 vector_of_tables:[SubTable] (id: 8, static_length: 3);
34 included_table:aos.fbs.testing.included.IncludedTable (id: 9);
35 unspecified_length_vector:[ubyte] (id: 10);
36 unspecified_length_string:string (id: 11);
37 unspecified_length_vector_of_strings:[string] (id: 12);
38}
39
40root_type TestTable;