Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 1 | namespace aos.testing; |
| 2 | |
| 3 | table Location { |
| 4 | name:string; |
| 5 | type:string; |
| 6 | frequency:int; |
| 7 | max_size:int; |
| 8 | } |
| 9 | |
| 10 | table Map { |
| 11 | match:Location; |
| 12 | rename:Location; |
| 13 | } |
| 14 | |
| 15 | table Application { |
| 16 | name:string; |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 17 | priority:int; |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 18 | maps:[Map]; |
| 19 | } |
| 20 | |
| 21 | table Configuration { |
| 22 | locations:[Location] (id: 0); |
| 23 | maps:[Map] (id: 1); |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 24 | apps:[Application] (id: 2); |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 25 | imports:[string] (id: 3); |
| 26 | |
| 27 | // 8 bit: byte ubyte bool |
| 28 | // 16 bit: short ushort |
| 29 | // 32 bit: int uint float |
| 30 | // 64 bit: long ulong double |
| 31 | |
| 32 | // Simple values. |
| 33 | foo_byte:byte (id: 4); |
| 34 | foo_ubyte:ubyte (id: 5); |
| 35 | foo_bool:bool (id: 6); |
| 36 | |
| 37 | foo_short:short (id: 7); |
| 38 | foo_ushort:ushort (id: 8); |
| 39 | |
| 40 | foo_int:int (id: 9); |
| 41 | foo_uint:uint (id: 10); |
| 42 | |
| 43 | foo_long:long (id: 11); |
| 44 | foo_ulong:ulong (id: 12); |
| 45 | |
| 46 | foo_float:float (id: 13); |
| 47 | foo_double:double (id: 14); |
| 48 | |
| 49 | foo_string:string (id: 15); |
| 50 | |
| 51 | // Test vectors now. |
| 52 | vector_foo_byte:[byte] (id: 16); |
| 53 | vector_foo_ubyte:[ubyte] (id: 17); |
| 54 | vector_foo_bool:[bool] (id: 18); |
| 55 | |
| 56 | vector_foo_short:[short] (id: 19); |
| 57 | vector_foo_ushort:[ushort] (id: 20); |
| 58 | |
| 59 | vector_foo_int:[int] (id: 21); |
| 60 | vector_foo_uint:[uint] (id: 22); |
| 61 | |
| 62 | vector_foo_long:[long] (id: 23); |
| 63 | vector_foo_ulong:[ulong] (id: 24); |
| 64 | |
| 65 | vector_foo_float:[float] (id: 25); |
| 66 | vector_foo_double:[double] (id: 26); |
| 67 | |
| 68 | vector_foo_string:[string] (id: 27); |
| 69 | |
| 70 | // And a simple nested application. |
| 71 | single_application:Application (id: 28); |
Austin Schuh | 09d7ffa | 2019-10-03 23:43:34 -0700 | [diff] [blame] | 72 | |
| 73 | // TODO(austin): enum |
| 74 | |
| 75 | // And nest this object to get some crazy coverage. |
| 76 | nested_config:Configuration (id: 29); |
Austin Schuh | 3e95e5d | 2019-09-20 00:08:54 -0700 | [diff] [blame] | 77 | } |
| 78 | |
| 79 | root_type Configuration; |