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

Function test_line_change_modified

atomic-core/src/diff/semantic/tests.rs:154–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

152
153 #[test]
154 fn test_line_change_modified() {
155 let before = SemanticLine::new(b"let x = 1;\n", 1);
156 let after = SemanticLine::new(b"let x = 2;\n", 1);
157 let token_changes = compute_token_changes(&before, &after, &WordDiffConfig::default());
158
159 let change = LineChange::Modified {
160 old_line_num: 1,
161 new_line_num: 1,
162 before,
163 after,
164 token_changes,
165 };
166 assert!(change.is_modified());
167 assert_eq!(change.old_line_num(), Some(1));
168 assert_eq!(change.new_line_num(), Some(1));
169 }
170
171 #[test]
172 fn test_line_change_summary() {

Callers

nothing calls this directly

Calls 1

compute_token_changesFunction · 0.85

Tested by

no test coverage detected