()
| 319 | |
| 320 | #[test] |
| 321 | fn test_tree_map_vec_serialization() { |
| 322 | let (dim_bufman, data_bufmans, _cursor, temp_dir) = setup_test(); |
| 323 | let mut rng = rand::thread_rng(); |
| 324 | let map = TreeMapVec::new(dim_bufman, data_bufmans); |
| 325 | |
| 326 | for i in 0..10000 { |
| 327 | map.push(0.into(), &(i / 10), rng.gen_range(0..u16::MAX)); |
| 328 | } |
| 329 | |
| 330 | // edge case |
| 331 | map.push(0.into(), &u64::MAX, rng.gen_range(0..u16::MAX)); |
| 332 | |
| 333 | map.serialize().unwrap(); |
| 334 | |
| 335 | let (dim_bufman, data_bufmans) = setup_test_in_dir(temp_dir.as_ref()); |
| 336 | |
| 337 | let deserialized = TreeMapVec::<u64, u16>::deserialize(dim_bufman, data_bufmans).unwrap(); |
| 338 | |
| 339 | assert_eq!(map, deserialized); |
| 340 | } |
| 341 | |
| 342 | #[test] |
| 343 | fn test_tree_map_incremental_serialization() { |
nothing calls this directly
no test coverage detected