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

Function test_insert_stats_merge

atomic-repository/src/apply/tests.rs:72–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

70
71#[test]
72fn test_insert_stats_merge() {
73 let mut stats1 = InsertStats::new();
74 stats1.changes_applied = 2;
75 stats1.atoms_processed = 10;
76
77 let mut stats2 = InsertStats::new();
78 stats2.changes_applied = 1;
79 stats2.atoms_processed = 5;
80 stats2.conflicts_detected = 1;
81
82 stats1.merge(stats2);
83
84 assert_eq!(stats1.changes_applied, 3);
85 assert_eq!(stats1.atoms_processed, 15);
86 assert_eq!(stats1.conflicts_detected, 1);
87}
88
89// InsertOutcome Tests
90

Callers

nothing calls this directly

Calls 1

mergeMethod · 0.45

Tested by

no test coverage detected