James Kuszmaul | f5eb468 | 2023-09-22 17:16:59 -0700 | [diff] [blame] | 1 | namespace aos.fbs.testing; |
| 2 | |
| 3 | attribute "static_length"; |
| 4 | |
| 5 | table FirstUnion { |
| 6 | foo:int (id: 0); |
| 7 | } |
| 8 | |
| 9 | table SecondUnion { |
| 10 | bar:double (id: 0); |
| 11 | } |
| 12 | |
| 13 | union UnionType { FirstUnion, SecondUnion } |
| 14 | |
| 15 | table TableWithUnion { |
| 16 | union_field:UnionType (id: 1); |
| 17 | } |
| 18 | |
| 19 | table MissingVectorLength { |
| 20 | vector_no_length:[int] (id: 0); |
| 21 | } |
| 22 | |
| 23 | table NonIntegerVectorLength { |
| 24 | vector_badlength:[int] (id: 0, static_length: "abc"); |
| 25 | } |
| 26 | |
| 27 | table NegativeVectorLength { |
| 28 | vector_badlength:[int] (id: 0, static_length: -1); |
| 29 | } |
| 30 | |
| 31 | table ZeroVectorLength { |
| 32 | vector_badlength:[int] (id: 0, static_length: 0); |
| 33 | } |
| 34 | |
| 35 | table MissingStringLength { |
| 36 | string_no_length:string (id: 0); |
| 37 | } |
| 38 | |
| 39 | table MissingSubStringLength { |
| 40 | substring_no_length:[string] (id: 0, static_length: 3); |
| 41 | } |
| 42 | |
| 43 | // Arbitrary. |
| 44 | root_type TableWithUnion; |