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

Function test_inline_diff_variable_rename

atomic-core/src/diff/inline.rs:1196–1209  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1194
1195 #[test]
1196 fn test_inline_diff_variable_rename() {
1197 let old = b"let foo = bar;";
1198 let new = b"let baz = bar;";
1199
1200 let diff = compute_inline_diff(old, new);
1201 assert!(diff.has_changes());
1202
1203 // "foo" should be deleted, "baz" inserted
1204 let deleted: Vec<_> = diff.old_changes().collect();
1205 let inserted: Vec<_> = diff.new_changes().collect();
1206
1207 assert!(!deleted.is_empty());
1208 assert!(!inserted.is_empty());
1209 }
1210
1211 // InlineDiffConfig tests
1212

Callers

nothing calls this directly

Calls 3

compute_inline_diffFunction · 0.85
old_changesMethod · 0.45
new_changesMethod · 0.45

Tested by

no test coverage detected