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

Function test_diff_op_display

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

Source from the content-addressed store, hash-verified

620
621 #[test]
622 fn test_diff_op_display() {
623 assert_eq!(
624 format!("{}", DiffOp::equal(0, 0, 3)),
625 "Equal(old=0..3, new=0..3)"
626 );
627 assert_eq!(
628 format!("{}", DiffOp::insert(5, 5, 2)),
629 "Insert(at old=5, new=5..7)"
630 );
631 assert_eq!(
632 format!("{}", DiffOp::delete(3, 3, 2)),
633 "Delete(old=3..5, at new=3)"
634 );
635 assert_eq!(
636 format!("{}", DiffOp::replace(1, 2, 1, 3)),
637 "Replace(old=1..3, new=1..4)"
638 );
639 }
640
641 #[test]
642 fn test_replacement_new() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected