()
| 745 | |
| 746 | #[test] |
| 747 | fn test_diff_result_iteration() { |
| 748 | let mut result = DiffResult::new(); |
| 749 | result.push(DiffOp::equal(0, 0, 1)); |
| 750 | result.push(DiffOp::insert(1, 1, 1)); |
| 751 | |
| 752 | // Borrow iteration |
| 753 | let ops: Vec<_> = result.iter().collect(); |
| 754 | assert_eq!(ops.len(), 2); |
| 755 | |
| 756 | // Into iteration |
| 757 | let ops: Vec<_> = result.into_iter().collect(); |
| 758 | assert_eq!(ops.len(), 2); |
| 759 | } |
| 760 | |
| 761 | #[test] |
| 762 | fn test_diff_result_index() { |