()
| 469 | |
| 470 | #[test] |
| 471 | fn tier_stats_populated() { |
| 472 | let mut slab = SlabAllocator::new(); |
| 473 | slab.alloc(b"small"); // 64B tier |
| 474 | slab.alloc(&[0; 200]); // 256B tier |
| 475 | |
| 476 | let stats = slab.tier_stats(); |
| 477 | assert_eq!(stats.len(), TIER_SIZES.len()); |
| 478 | assert_eq!(stats[0].occupied_slots, 1); // 64B tier |
| 479 | assert_eq!(stats[2].occupied_slots, 1); // 256B tier |
| 480 | assert_eq!(stats[1].occupied_slots, 0); // 128B tier unused |
| 481 | } |
| 482 | |
| 483 | #[test] |
| 484 | fn used_bytes_and_capacity() { |
nothing calls this directly
no test coverage detected