()
| 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() { |