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

Function test_outcome_into_conflicts

atomic-core/src/crdt/apply/context.rs:1117–1130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1115
1116 #[test]
1117 fn test_outcome_into_conflicts() {
1118 use super::super::conflict::{ConflictKind, CrdtConflict};
1119
1120 let options = ApplyOptions::builder().fail_on_conflict(false).build();
1121 let mut context = ApplyContext::new(options);
1122
1123 let conflict = CrdtConflict::new(ConflictKind::ConcurrentInsert, "test".to_string());
1124 context.add_conflict(conflict);
1125
1126 let outcome = context.finish();
1127 let conflicts = outcome.into_conflicts();
1128
1129 assert_eq!(conflicts.len(), 1);
1130 }
1131
1132 #[test]
1133 fn test_outcome_into_parts() {

Callers

nothing calls this directly

Calls 5

fail_on_conflictMethod · 0.80
buildMethod · 0.45
add_conflictMethod · 0.45
finishMethod · 0.45
into_conflictsMethod · 0.45

Tested by

no test coverage detected