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

Function test_find_unique_matches_duplicates

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

Source from the content-addressed store, hash-verified

472
473 #[test]
474 fn test_find_unique_matches_duplicates() {
475 let old = lines(&["a\n", "a\n", "b\n"]);
476 let new = lines(&["a\n", "b\n", "a\n"]);
477
478 let matches = find_unique_matches(&old, &new);
479
480 // Only b is unique in both
481 assert_eq!(matches.len(), 1);
482 assert_eq!(matches[0].old_idx, 2);
483 assert_eq!(matches[0].new_idx, 1);
484 }
485
486 #[test]
487 fn test_find_unique_matches_none() {

Callers

nothing calls this directly

Calls 2

find_unique_matchesFunction · 0.85
linesFunction · 0.70

Tested by

no test coverage detected