()
| 283 | |
| 284 | #[test] |
| 285 | fn block_roundtrip() { |
| 286 | let postings = make_postings(50); |
| 287 | let block = PostingBlock::from_postings(&postings); |
| 288 | assert_eq!(block.len(), 50); |
| 289 | |
| 290 | let bytes = block.to_bytes(); |
| 291 | let restored = PostingBlock::from_bytes(&bytes).unwrap(); |
| 292 | |
| 293 | assert_eq!(restored.doc_ids, block.doc_ids); |
| 294 | assert_eq!(restored.term_freqs, block.term_freqs); |
| 295 | assert_eq!(restored.fieldnorms, block.fieldnorms); |
| 296 | assert_eq!(restored.positions, block.positions); |
| 297 | } |
| 298 | |
| 299 | #[test] |
| 300 | fn block_128_roundtrip() { |
nothing calls this directly
no test coverage detected