...

Text file src/github.com/google/flatbuffers/tests/alignment_test.fbs

Documentation: github.com/google/flatbuffers/tests

     1// sizeof(BadAlignmentSmall) == 12
     2// alignof(BadAlignmentSmall) == 4
     3struct BadAlignmentSmall {
     4  var_0: uint;
     5  var_1: uint;
     6  var_2: uint;
     7}
     8
     9// sizeof(BadAlignmentLarge) == 8
    10// alignof(BadAlignmentLarge) == 8
    11struct BadAlignmentLarge {
    12  var_0: ulong;
    13}
    14
    15table OuterLarge {
    16  large: BadAlignmentLarge;
    17}
    18
    19table BadAlignmentRoot {
    20  large: OuterLarge;
    21  small: [BadAlignmentSmall];
    22}
    23
    24root_type BadAlignmentRoot;

View as plain text