()
| 451 | |
| 452 | #[test] |
| 453 | fn deterministic() { |
| 454 | let text = "Deterministic output means same input produces same output every time."; |
| 455 | let a = chunk_text(text, 15, 3, ChunkStrategy::Character).unwrap(); |
| 456 | let b = chunk_text(text, 15, 3, ChunkStrategy::Character).unwrap(); |
| 457 | assert_eq!(a.len(), b.len()); |
| 458 | for (ca, cb) in a.iter().zip(b.iter()) { |
| 459 | assert_eq!(ca.text, cb.text); |
| 460 | assert_eq!(ca.start, cb.start); |
| 461 | assert_eq!(ca.end, cb.end); |
| 462 | } |
| 463 | } |
| 464 | |
| 465 | #[test] |
| 466 | fn overlap_produces_shared_chars() { |
nothing calls this directly
no test coverage detected