debian/rust-vendor/hashbrown-0.14.5/tests/raw.rs
raw| 1 | #![cfg(feature = "raw")] |
| 2 | |
| 3 | use hashbrown::raw::RawTable; |
| 4 | use std::mem; |
| 5 | |
| 6 | #[test] |
| 7 | fn test_allocation_info() { |
| 8 | assert_eq!(RawTable::<()>::new().allocation_info().1.size(), 0); |
| 9 | assert_eq!(RawTable::<u32>::new().allocation_info().1.size(), 0); |
| 10 | assert!(RawTable::<u32>::with_capacity(1).allocation_info().1.size() > mem::size_of::<u32>()); |
| 11 | } |