Skip to content

Commit

Permalink
WIP: try to make the test more independent of slot size
Browse files Browse the repository at this point in the history
  • Loading branch information
sk1p committed Feb 2, 2024
1 parent 6e07195 commit 635d958
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions libertem_asi_tpx3/src/chunk_stack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -718,14 +718,15 @@ mod tests {
assert_eq!(fs.padding_bytes, 7);
assert_eq!(fs.cursor, 8);

assert!(!fs.can_fit(4096));
assert!(fs.can_fit(4088));
assert!(!fs.can_fit(slot_size));
assert!(fs.can_fit(slot_size - 8));

fs.slice_for_writing(4088, layout.clone());
fs.slice_for_writing(slot_size - 8, layout.clone());
assert_eq!(fs.padding_bytes, 7);
assert_eq!(fs.cursor, 4096);
assert_eq!(fs.cursor, slot_size);
assert!(!fs.can_fit(1));
assert!(!fs.can_fit(8));
assert!(!fs.can_fit(4096));
assert!(!fs.can_fit(slot_size));
}
}

0 comments on commit 635d958

Please sign in to comment.