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

Function test_common_affixes

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

Source from the content-addressed store, hash-verified

856
857 #[test]
858 fn test_common_affixes() {
859 let old = vec![1, 2, 3, 4, 5];
860 let new = vec![1, 2, 9, 4, 5];
861 let (prefix, suffix) = common_affixes(&old, &new);
862 assert_eq!(prefix, 2);
863 assert_eq!(suffix, 2);
864 }
865
866 #[test]
867 fn test_common_affixes_all_equal() {

Callers

nothing calls this directly

Calls 1

common_affixesFunction · 0.85

Tested by

no test coverage detected