mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-18 06:54:26 +00:00
use ALIGN for Push::alignment in struct types (#8398)
* use ALIGN for Push::alignment in struct types * regenerate and add a test for struct alignment
This commit is contained in:
committed by
GitHub
parent
807adb73b2
commit
49061f8c7c
@@ -2422,6 +2422,14 @@ mod push_impls {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 1]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn push_u8_generated_struct_alignment() {
|
||||
let mut b = flatbuffers::FlatBufferBuilder::new();
|
||||
b.push(1u8);
|
||||
b.push(my_game::example::Test::new(10, 20));
|
||||
check(&b, &[10, 0, 20, 0, 0, 1]);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user