| 933 | |
| 934 | #[test] |
| 935 | fn test_side_by_side_changes() { |
| 936 | let old = b"a\nb\nc\n"; |
| 937 | let new = b"a\nx\nc\n"; |
| 938 | let diff = SideBySideDiff::new(old, new, Algorithm::Myers); |
| 939 | |
| 940 | let pairs: Vec<_> = diff.pairs().collect(); |
| 941 | |
| 942 | // First pair: unchanged |
| 943 | assert!(pairs[0].is_unchanged()); |
| 944 | |
| 945 | // Second pair: old has 'b', new has 'x' (or they're separate) |
| 946 | // The exact pairing depends on how Replace is handled |
| 947 | assert!(pairs.iter().any(|p| p.is_change())); |
| 948 | } |
| 949 | |
| 950 | #[test] |
| 951 | fn test_diff_stats() { |