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

Function test_result_merge

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

Source from the content-addressed store, hash-verified

338
339#[test]
340fn test_result_merge() {
341 let mut result1 = DetectionResult::new();
342 result1.add_added(DetectedFile::added("a.rs"));
343 result1.increment_scanned();
344
345 let mut result2 = DetectionResult::new();
346 result2.add_deleted(DetectedFile::deleted("d.rs"));
347 result2.increment_scanned();
348 result2.add_error("error");
349
350 result1.merge(result2);
351
352 assert_eq!(result1.added_count(), 1);
353 assert_eq!(result1.deleted_count(), 1);
354 assert_eq!(result1.files_scanned(), 2);
355 assert!(result1.has_errors());
356}
357
358// ========================================================================
359// detect_changes_simple tests

Callers

nothing calls this directly

Calls 7

addedFunction · 0.85
deletedFunction · 0.85
add_addedMethod · 0.80
increment_scannedMethod · 0.80
add_deletedMethod · 0.80
add_errorMethod · 0.45
mergeMethod · 0.45

Tested by

no test coverage detected