()
| 221 | |
| 222 | #[test] |
| 223 | fn insert_and_query() { |
| 224 | let mt = Memtable::new(MemtableConfig::default()); |
| 225 | mt.insert("hello", make_posting(0, 1)); |
| 226 | mt.insert("hello", make_posting(1, 2)); |
| 227 | mt.insert("world", make_posting(0, 1)); |
| 228 | |
| 229 | assert_eq!(mt.get_postings("hello").len(), 2); |
| 230 | assert_eq!(mt.get_postings("world").len(), 1); |
| 231 | assert!(mt.get_postings("missing").is_empty()); |
| 232 | assert_eq!(mt.term_count(), 2); |
| 233 | assert_eq!(mt.posting_count(), 3); |
| 234 | } |
| 235 | |
| 236 | #[test] |
| 237 | fn remove_doc() { |
nothing calls this directly
no test coverage detected