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

Function test_multiple_changes

atomic-core/src/diff/myers.rs:275–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

273
274 #[test]
275 fn test_multiple_changes() {
276 let old = lines(&["a\n", "b\n", "c\n", "d\n", "e\n"]);
277 let new = lines(&["a\n", "x\n", "c\n", "y\n", "e\n"]);
278
279 let result = diff(&old, &new);
280
281 // b→x and d→y
282 assert_eq!(result.deletions(), 2);
283 assert_eq!(result.insertions(), 2);
284 }
285
286 #[test]
287 fn test_insert_at_start() {

Callers

nothing calls this directly

Calls 2

linesFunction · 0.70
diffFunction · 0.70

Tested by

no test coverage detected