()
| 1094 | |
| 1095 | #[test] |
| 1096 | fn test_remove_nonexistent_key_raises_error() { |
| 1097 | let mut tree = BPlusTreeMap::new(4).unwrap(); |
| 1098 | tree.insert(1, "one".to_string()); |
| 1099 | tree.insert(2, "two".to_string()); |
| 1100 | |
| 1101 | // Try to remove non-existent key |
| 1102 | let result = tree.remove_item(&3); |
| 1103 | assert_eq!(result, Err(BPlusTreeError::KeyNotFound)); |
| 1104 | |
| 1105 | // Tree should be unchanged |
| 1106 | assert_eq!(tree.len(), 2); |
| 1107 | assert_eq!(tree.get(&1), Some(&"one".to_string())); |
| 1108 | assert_eq!(tree.get(&2), Some(&"two".to_string())); |
| 1109 | } |
| 1110 | |
| 1111 | // ============================================================================ |
| 1112 | // NEW TESTS - Iterator Support |
nothing calls this directly
no test coverage detected