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

Function test_result_getters

atomic-core/src/record/workflow/detect/tests.rs:303–316  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301
302#[test]
303fn test_result_getters() {
304 let mut result = DetectionResult::new();
305 result.add_added(DetectedFile::added("a.rs"));
306 result.add_deleted(DetectedFile::deleted("d.rs"));
307 result.add_modified(DetectedFile::modified("m.rs"));
308 result.add_moved(DetectedFile::moved("o.rs", "n.rs"));
309 result.add_unchanged(DetectedFile::unchanged("u.rs"));
310
311 assert_eq!(result.added().len(), 1);
312 assert_eq!(result.deleted().len(), 1);
313 assert_eq!(result.modified().len(), 1);
314 assert_eq!(result.moved().len(), 1);
315 assert_eq!(result.unchanged().len(), 1);
316}
317
318#[test]
319fn test_result_changed_files_iterator() {

Callers

nothing calls this directly

Calls 8

addedFunction · 0.85
deletedFunction · 0.85
modifiedFunction · 0.85
add_addedMethod · 0.80
add_deletedMethod · 0.80
add_modifiedMethod · 0.80
add_movedMethod · 0.80
add_unchangedMethod · 0.80

Tested by

no test coverage detected