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

Function test_diff_insert

atomic-core/src/diff/mod.rs:769–776  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

767
768 #[test]
769 fn test_diff_insert() {
770 let old = b"line1\nline3\n";
771 let new = b"line1\nline2\nline3\n";
772 let result = diff_text(old, new, Algorithm::Myers);
773 assert!(!result.is_unchanged());
774 assert_eq!(result.insertions(), 1);
775 assert_eq!(result.deletions(), 0);
776 }
777
778 #[test]
779 fn test_diff_delete() {

Callers

nothing calls this directly

Calls 1

diff_textFunction · 0.85

Tested by

no test coverage detected