()
| 236 | |
| 237 | #[test] |
| 238 | fn remove_entry() { |
| 239 | let mut idx = PkIndex::new(); |
| 240 | let pk = encode_pk(&Value::Integer(1)); |
| 241 | let loc = RowLocation { |
| 242 | segment_id: 0, |
| 243 | row_index: 0, |
| 244 | }; |
| 245 | |
| 246 | idx.insert(pk.clone(), loc).expect("insert"); |
| 247 | let removed = idx.remove(&pk); |
| 248 | assert_eq!(removed, Some(loc)); |
| 249 | assert!(idx.is_empty()); |
| 250 | } |
| 251 | |
| 252 | #[test] |
| 253 | fn bulk_insert() { |