()
| 1117 | |
| 1118 | #[test] |
| 1119 | fn test_tracker_extend() { |
| 1120 | let mut tracker = CrdtConflictTracker::new(); |
| 1121 | |
| 1122 | let conflicts = vec![ |
| 1123 | CrdtConflict::new(ConflictKind::ConcurrentInsert, "1".to_string()), |
| 1124 | CrdtConflict::new(ConflictKind::DeleteModify, "2".to_string()), |
| 1125 | ]; |
| 1126 | |
| 1127 | tracker.extend(conflicts); |
| 1128 | assert_eq!(tracker.count(), 2); |
| 1129 | } |
| 1130 | |
| 1131 | #[test] |
| 1132 | fn test_tracker_from_iterator() { |