Skip to content

Commit

Permalink
test(body): fix Body size of tests on 32-bit architecture
Browse files Browse the repository at this point in the history
Closes #2158
  • Loading branch information
seanmonstar committed Mar 24, 2020
1 parent 22fcd66 commit 597cef2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/body/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,18 +565,18 @@ mod tests {
fn test_size_of() {
// These are mostly to help catch *accidentally* increasing
// the size by too much.
assert_eq!(
mem::size_of::<Body>(),
mem::size_of::<usize>() * 5 + mem::size_of::<u64>(),
"Body"
);

assert_eq!(
mem::size_of::<Body>(),
mem::size_of::<Option<Body>>(),
"Option<Body>"
let body_size = mem::size_of::<Body>();
let body_expected_size = mem::size_of::<u64>() * 6;
assert!(
body_size <= body_expected_size,
"Body size = {} <= {}",
body_size,
body_expected_size,
);

assert_eq!(body_size, mem::size_of::<Option<Body>>(), "Option<Body>");

assert_eq!(
mem::size_of::<Sender>(),
mem::size_of::<usize>() * 4,
Expand Down

0 comments on commit 597cef2

Please sign in to comment.