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

Function test_file_diff_has_changes

atomic-cli/src/commands/diff/tests.rs:486–494  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

484
485 #[test]
486 fn test_file_diff_has_changes() {
487 let mut diff = FileDiff::modified("test.rs");
488 assert!(!diff.has_changes());
489
490 let mut graph_op = DiffHunk::new(1, 1, 1, 2);
491 graph_op.add_line(HunkLine::added("new", 1));
492 diff.add_hunk(graph_op);
493 assert!(diff.has_changes());
494 }
495
496 #[test]
497 fn test_file_diff_has_changes_binary() {

Callers

nothing calls this directly

Calls 4

modifiedFunction · 0.85
addedFunction · 0.85
add_lineMethod · 0.45
add_hunkMethod · 0.45

Tested by

no test coverage detected