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

Function test_diff_stats

atomic-core/src/diff/display.rs:951–959  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

949
950 #[test]
951 fn test_diff_stats() {
952 let old = b"a\nb\nc\n";
953 let new = b"a\nx\ny\nc\n";
954 let diff = UnifiedDiff::new(old, new, Algorithm::Myers);
955
956 let stats = DiffStats::from_diff(diff.diff_result());
957 assert_eq!(stats.files_changed, 1);
958 assert!(stats.lines_added > 0 || stats.lines_removed > 0);
959 }
960
961 #[test]
962 fn test_diff_stats_display() {

Callers

nothing calls this directly

Calls 1

diff_resultMethod · 0.80

Tested by

no test coverage detected