diff --git a/src/lib.rs b/src/lib.rs index 60e61e7..d38f315 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -703,6 +703,12 @@ mod tests { assert!((z.as_ptr() as usize).abs_diff(x.as_ptr() as usize) >= MIN_DIFF); } + #[test] + #[should_panic] + fn zero_slab_capacity() { + let _ = SlabAllocator::<()>::new(0); + } + #[cfg(debug_assertions)] #[test] #[should_panic]