()
| 380 | |
| 381 | #[test] |
| 382 | fn test_semantic_diff_multiline() { |
| 383 | let old = b"fn main() {\n let x = 1;\n println!(x);\n}\n"; |
| 384 | let new = b"fn main() {\n let x = 42;\n let y = 2;\n println!(x);\n}\n"; |
| 385 | |
| 386 | let diff = semantic_diff(old, new); |
| 387 | assert!(diff.has_changes()); |
| 388 | |
| 389 | // Line 2 modified (1 -> 42), line 3 added (let y = 2) |
| 390 | assert!(diff.stats().lines_modified >= 1); |
| 391 | assert!(diff.stats().lines_added >= 1); |
| 392 | } |
| 393 | |
| 394 | #[test] |
| 395 | fn test_semantic_diff_all_token_changes() { |
nothing calls this directly
no test coverage detected