()
| 979 | |
| 980 | #[test] |
| 981 | fn test_context_add_conflict() { |
| 982 | use super::super::conflict::{ConflictKind, CrdtConflict}; |
| 983 | |
| 984 | let options = ApplyOptions::builder().fail_on_conflict(false).build(); |
| 985 | let mut context = ApplyContext::new(options); |
| 986 | |
| 987 | let conflict = |
| 988 | CrdtConflict::new(ConflictKind::ConcurrentInsert, "test conflict".to_string()); |
| 989 | context.add_conflict(conflict); |
| 990 | |
| 991 | assert!(context.has_conflicts()); |
| 992 | assert_eq!(context.conflict_count(), 1); |
| 993 | assert!(!context.has_failed()); // fail_on_conflict is false |
| 994 | } |
| 995 | |
| 996 | #[test] |
| 997 | fn test_context_add_conflict_with_fail() { |
nothing calls this directly
no test coverage detected