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

Function test_word_diff_complex_code

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

Source from the content-addressed store, hash-verified

1233
1234 #[test]
1235 fn test_word_diff_complex_code() {
1236 let old = b"pub fn process(items: Vec<Item>) -> Result<(), Error> {";
1237 let new = b"pub fn process(items: &[Item]) -> Result<(), Error> {";
1238
1239 let result = word_diff(old, new);
1240 assert!(result.has_changes());
1241
1242 // Should detect the Vec<Item> -> &[Item] change
1243 let changes: Vec<_> = result.changes().collect();
1244 assert!(!changes.is_empty());
1245 }
1246
1247 #[test]
1248 fn test_word_diff_many_changes() {

Callers

nothing calls this directly

Calls 2

word_diffFunction · 0.85
changesMethod · 0.45

Tested by

no test coverage detected