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

Function test_diff_stats_add_file

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

Source from the content-addressed store, hash-verified

184
185 #[test]
186 fn test_diff_stats_add_file() {
187 let mut stats = DiffStats::new();
188 stats.add_file(FileDiffStats::new("file1.rs", 10, 5, 'M'));
189 stats.add_file(FileDiffStats::new("file2.rs", 3, 2, 'M'));
190
191 assert_eq!(stats.file_count(), 2);
192 assert_eq!(stats.total_insertions(), 13);
193 assert_eq!(stats.total_deletions(), 7);
194 assert_eq!(stats.total_changes(), 20);
195 }
196
197 #[test]
198 fn test_diff_stats_has_changes() {

Callers

nothing calls this directly

Calls 1

add_fileMethod · 0.45

Tested by

no test coverage detected