| namespace aos.testing; |
| |
| enum BaseType : byte { |
| None, |
| UType, |
| Bool, |
| Byte, |
| UByte, |
| Short, |
| UShort, |
| Int, |
| UInt, |
| Long, |
| ULong, |
| Float, |
| Double, |
| String, |
| Vector, |
| Obj, // Used for tables & structs. |
| Union, |
| Array |
| } |
| |
| table Location { |
| name:string; |
| type:string; |
| frequency:int; |
| max_size:int; |
| } |
| |
| table Map { |
| match:Location; |
| rename:Location; |
| } |
| |
| table Application { |
| name:string; |
| priority:int; |
| maps:[Map]; |
| } |
| |
| table VectorOfStrings { |
| str:[string]; |
| } |
| |
| table VectorOfVectorOfString { |
| v:[VectorOfStrings]; |
| } |
| |
| struct FooStructNested { |
| foo_byte:byte; |
| } |
| |
| struct FooStruct { |
| foo_byte:byte; |
| nested_struct:FooStructNested; |
| } |
| |
| struct StructEnum { |
| foo_enum:BaseType; |
| } |
| |
| table Configuration { |
| locations:[Location] (id: 0); |
| maps:[Map] (id: 1); |
| apps:[Application] (id: 2); |
| imports:[string] (id: 3); |
| |
| // 8 bit: byte ubyte bool |
| // 16 bit: short ushort |
| // 32 bit: int uint float |
| // 64 bit: long ulong double |
| |
| // Simple values. |
| foo_byte:byte (id: 4); |
| foo_ubyte:ubyte (id: 5); |
| foo_bool:bool (id: 6); |
| |
| foo_short:short (id: 7); |
| foo_ushort:ushort (id: 8); |
| |
| foo_int:int (id: 9); |
| foo_uint:uint (id: 10); |
| |
| foo_long:long (id: 11); |
| foo_ulong:ulong (id: 12); |
| |
| foo_float:float (id: 13); |
| foo_double:double (id: 14); |
| |
| foo_string:string (id: 15); |
| |
| foo_enum:BaseType (id: 16); |
| foo_enum_default:BaseType = None (id: 17); |
| |
| // Test vectors now. |
| vector_foo_byte:[byte] (id: 18); |
| vector_foo_ubyte:[ubyte] (id: 19); |
| vector_foo_bool:[bool] (id: 20); |
| |
| vector_foo_short:[short] (id: 21); |
| vector_foo_ushort:[ushort] (id: 22); |
| |
| vector_foo_int:[int] (id: 23); |
| vector_foo_uint:[uint] (id: 24); |
| |
| vector_foo_long:[long] (id: 25); |
| vector_foo_ulong:[ulong] (id: 26); |
| |
| vector_foo_float:[float] (id: 27); |
| vector_foo_double:[double] (id: 28); |
| |
| vector_foo_string:[string] (id: 29); |
| |
| vector_foo_enum:[BaseType] (id: 30); |
| |
| // And a simple nested application. |
| single_application:Application (id: 31); |
| |
| // And nest this object to get some crazy coverage. |
| nested_config:Configuration (id: 32); |
| |
| vov:VectorOfVectorOfString (id: 33); |
| |
| foo_struct:FooStruct (id: 34); |
| vector_foo_struct:[FooStruct] (id: 35); |
| foo_struct_enum:StructEnum (id: 36); |
| } |
| |
| root_type Configuration; |