diff --git a/iceoryx2/src/service/static_config/message_type_details.rs b/iceoryx2/src/service/static_config/message_type_details.rs index 4bec34e1a..0d1c20d7b 100644 --- a/iceoryx2/src/service/static_config/message_type_details.rs +++ b/iceoryx2/src/service/static_config/message_type_details.rs @@ -322,6 +322,34 @@ mod tests { let expected = Layout::new::(); assert_that!(sut, eq expected); } + fn test_sample_layout1() { + #[repr(C)] + struct Demo2 { + header: i64, + _user_header: i32, + _aligment: i8, + payload: i16, + _aligment2: i8, + } + let details = MessageTypeDetails::from::(TypeVariant::FixedSize); + let sut = details.sample_layout(1); + let expected = Layout::new::(); + assert_that!(sut, eq expected); + } + fn test_sample_layout2() { + #[repr(C)] + struct Demo { + header: i64, + _user_header: i64, + _aligment: i8, + payload: i64, + _aligment2: i8, + } + let details = MessageTypeDetails::from::(TypeVariant::FixedSize); + let sut = details.sample_layout(1); + let expected = Layout::new::(); + assert_that!(sut, eq expected); + } #[test] fn test_payload_layout() {