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

Function test_inline_diff_number_change

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

Source from the content-addressed store, hash-verified

1036
1037 #[test]
1038 fn test_inline_diff_number_change() {
1039 let diff = compute_inline_diff(b"const x = 1;", b"const x = 2;");
1040 assert!(diff.has_changes());
1041
1042 // The number should be highlighted
1043 let old_changes: Vec<_> = diff.old_changes().collect();
1044 let new_changes: Vec<_> = diff.new_changes().collect();
1045
1046 assert!(!old_changes.is_empty());
1047 assert!(!new_changes.is_empty());
1048 }
1049
1050 #[test]
1051 fn test_inline_diff_insertion_in_middle() {

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