Asserts that the map behaves consistently as a non-empty map.
(map: &mut Map<N, M>, len: usize)
| 229 | |
| 230 | /// Asserts that the map behaves consistently as a non-empty map. |
| 231 | fn assert_not_empty<const N: usize, const M: usize>(map: &mut Map<N, M>, len: usize) { |
| 232 | assert!(!map.is_empty()); |
| 233 | assert_eq!(map.len(), len); |
| 234 | |
| 235 | assert_eq!(map.iter().count(), len); |
| 236 | assert_eq!(map.keys().count(), len); |
| 237 | assert_eq!(map.values().count(), len); |
| 238 | } |
| 239 | |
| 240 | /// Extends the map with entries and then clears it, |
| 241 | /// asserting correct behavior before and after. |
no outgoing calls
no test coverage detected
searching dependent graphs…