Fix size tests on architectures with 32-bit pointers

This commit is contained in:
Jonas Schäfer 2022-04-23 15:28:49 +02:00
parent b06dda46a3
commit 96065dc26d
2 changed files with 16 additions and 4 deletions

View file

@ -335,10 +335,10 @@ mod tests {
#[cfg(target_pointer_width = "32")]
#[test]
fn test_size() {
assert_size!(Range, 40);
assert_size!(File, 128);
assert_size!(Description, 128);
assert_size!(Checksum, 144);
assert_size!(Range, 32);
assert_size!(File, 112);
assert_size!(Description, 112);
assert_size!(Checksum, 128);
assert_size!(Received, 16);
}

View file

@ -247,6 +247,18 @@ mod tests {
use super::*;
use std::convert::TryInto;
#[cfg(target_pointer_width = "32")]
#[test]
fn test_size() {
assert_size!(Event, 1);
assert_size!(Insert, 20);
assert_size!(Erase, 12);
assert_size!(Wait, 4);
assert_size!(Action, 24);
assert_size!(Rtt, 32);
}
#[cfg(target_pointer_width = "64")]
#[test]
fn test_size() {
assert_size!(Event, 1);