Fix size tests on architectures with 32-bit pointers
This commit is contained in:
parent
b06dda46a3
commit
96065dc26d
2 changed files with 16 additions and 4 deletions
|
@ -335,10 +335,10 @@ mod tests {
|
||||||
#[cfg(target_pointer_width = "32")]
|
#[cfg(target_pointer_width = "32")]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Range, 40);
|
assert_size!(Range, 32);
|
||||||
assert_size!(File, 128);
|
assert_size!(File, 112);
|
||||||
assert_size!(Description, 128);
|
assert_size!(Description, 112);
|
||||||
assert_size!(Checksum, 144);
|
assert_size!(Checksum, 128);
|
||||||
assert_size!(Received, 16);
|
assert_size!(Received, 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -247,6 +247,18 @@ mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
use std::convert::TryInto;
|
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]
|
#[test]
|
||||||
fn test_size() {
|
fn test_size() {
|
||||||
assert_size!(Event, 1);
|
assert_size!(Event, 1);
|
||||||
|
|
Loading…
Reference in a new issue