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

Function test_complex_reordering

atomic-core/src/diff/patience.rs:632–641  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

630
631 #[test]
632 fn test_complex_reordering() {
633 let old = lines(&["first\n", "second\n", "third\n", "fourth\n", "fifth\n"]);
634 let new = lines(&["first\n", "third\n", "inserted\n", "fourth\n", "fifth\n"]);
635
636 let result = diff(&old, &new);
637
638 // second deleted, inserted added
639 assert_eq!(result.deletions(), 1);
640 assert_eq!(result.insertions(), 1);
641 }
642
643 #[test]
644 fn test_preserves_order() {

Callers

nothing calls this directly

Calls 2

linesFunction · 0.70
diffFunction · 0.70

Tested by

no test coverage detected