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

Function test_find_unique_matches_simple

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

Source from the content-addressed store, hash-verified

457 // Unique Match Tests
458 #[test]
459 fn test_find_unique_matches_simple() {
460 let old = lines(&["a\n", "b\n", "c\n"]);
461 let new = lines(&["a\n", "x\n", "c\n"]);
462
463 let matches = find_unique_matches(&old, &new);
464
465 // a and c are unique in both
466 assert_eq!(matches.len(), 2);
467 assert_eq!(matches[0].old_idx, 0);
468 assert_eq!(matches[0].new_idx, 0);
469 assert_eq!(matches[1].old_idx, 2);
470 assert_eq!(matches[1].new_idx, 2);
471 }
472
473 #[test]
474 fn test_find_unique_matches_duplicates() {

Callers

nothing calls this directly

Calls 2

find_unique_matchesFunction · 0.85
linesFunction · 0.70

Tested by

no test coverage detected