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

Function test_tracker_merge_from

atomic-core/src/crdt/apply/conflict.rs:1078–1089  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1076
1077 #[test]
1078 fn test_tracker_merge_from() {
1079 let mut tracker1 = CrdtConflictTracker::new();
1080 tracker1.add_simple(ConflictKind::ConcurrentInsert, "1");
1081
1082 let mut tracker2 = CrdtConflictTracker::new();
1083 tracker2.add_simple(ConflictKind::DeleteModify, "2");
1084
1085 tracker1.merge_from(&tracker2);
1086
1087 assert_eq!(tracker1.count(), 2);
1088 assert_eq!(tracker2.count(), 1); // tracker2 not consumed
1089 }
1090
1091 #[test]
1092 fn test_tracker_into_iterator() {

Callers

nothing calls this directly

Calls 2

add_simpleMethod · 0.80
merge_fromMethod · 0.80

Tested by

no test coverage detected