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

Function test_merge_adjacent_equals

atomic-core/src/diff/word.rs:1258–1266  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1256
1257 #[test]
1258 fn test_merge_adjacent_equals() {
1259 let result = word_diff(b"a b c", b"a b c");
1260
1261 // Should be one Equal operation, not three separate ones
1262 let equals: Vec<_> = result.ops().iter().filter(|op| op.is_equal()).collect();
1263
1264 // After merging, equal ranges should be combined
1265 assert!(!equals.is_empty());
1266 }
1267
1268 #[test]
1269 fn test_merge_delete_insert_to_replace() {

Callers

nothing calls this directly

Calls 4

word_diffFunction · 0.85
iterMethod · 0.45
opsMethod · 0.45
is_equalMethod · 0.45

Tested by

no test coverage detected