blob: 65d2b01339ffe183014f7b72745819654e53f346 [file] [log] [blame]
library fidl.test.encapsulatedstructs;
using zx;
struct Int8Int32 {
int8 a;
// padding of 3 bytes.
int32 b;
};
struct Int16Int8 {
int16 a;
int8 b;
// padding of 1 byte.
};
struct ArrayInt16Int8 {
array<Int16Int8>:3 arr;
// inner padding plus 3 bytes padding at the end.
};
struct StructPaddingTestStruct {
Int16Int8 trailing;
// padding of 4 bytes.
// after flattening the FourByteAlignedTrailingPaddingStruct into this
// struct for the coding tables, there will be 5 bytes of padding.
Int8Int32 inner;
ArrayInt16Int8 array;
// after flattening, there should be 3 bytes of padding after the array
// elements.
};
resource struct NonInlineStructTestStruct {
Int16Int8? element; // 8-byte alignment
zx.handle h;
// 4-byte padding after handle.
};
resource struct TopLevelStruct {
StructPaddingTestStruct a;
NonInlineStructTestStruct b;
};