"Fossies" - the Fresh Open Source Software Archive

Member "flatbuffers-23.1.21/tests/alignment_test.fbs" (21 Jan 2023, 417 Bytes) of package /linux/misc/flatbuffers-23.1.21.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

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