diff --git a/src/lib.rs b/src/lib.rs index 6188eec..70e880a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,6 +24,18 @@ mod tests { } struct Unit; + + #[test] + fn reinterpret() + { + let heap = heap![u8; 32]; + unsafe { + let heap = heap.reinterpret::(); + assert_eq!(heap.len(), 8); + let heap = heap.reinterpret::(); + assert_eq!(heap.len(), 32); + } + } #[test] fn zero_size() {