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

Function test_diff_stats_iter

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

Source from the content-addressed store, hash-verified

223
224 #[test]
225 fn test_diff_stats_iter() {
226 let mut stats = DiffStats::new();
227 stats.add_file(FileDiffStats::new("a.rs", 1, 0, 'M'));
228 stats.add_file(FileDiffStats::new("b.rs", 2, 0, 'M'));
229
230 let paths: Vec<_> = stats.iter().map(|f| f.path.as_str()).collect();
231 assert_eq!(paths, vec!["a.rs", "b.rs"]);
232 }
233
234 #[test]
235 fn test_diff_stats_into_iter() {

Callers

nothing calls this directly

Calls 3

add_fileMethod · 0.45
iterMethod · 0.45
as_strMethod · 0.45

Tested by

no test coverage detected