MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_diff_result_iteration

Function test_diff_result_iteration

atomic-core/src/diff/ops.rs:747–759  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

pushMethod · 0.45
iterMethod · 0.45
into_iterMethod · 0.45

Tested by

no test coverage detected