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

Function test_iter_files

atomic-core/src/output/repo/outcome.rs:439–450  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

437
438 #[test]
439 fn test_iter_files() {
440 let mut outcome = OutputOutcome::new();
441 outcome.record_file("main.rs", 100);
442 outcome.record_file("lib.rs", 200);
443
444 let files: Vec<_> = outcome.iter_files().collect();
445 assert_eq!(files.len(), 2);
446 assert_eq!(files[0].path, "main.rs");
447 assert_eq!(files[0].bytes, 100);
448 assert_eq!(files[1].path, "lib.rs");
449 assert_eq!(files[1].bytes, 200);
450 }
451
452 // ------------------------------------------------------------------------
453 // Directory Recording Tests

Callers

nothing calls this directly

Calls 2

iter_filesMethod · 0.80
record_fileMethod · 0.45

Tested by

no test coverage detected