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

Function test_apply_replace_not_found

atomic-core/src/crdt/apply/leaf.rs:872–886  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

870
871 #[test]
872 fn test_apply_replace_not_found() {
873 let mut txn = MockTxn::new();
874 let mut context = ApplyContext::new(ApplyOptions::default());
875 let branch_id = BranchId::new(NodeId::new(1), 0);
876 let leaf_id = LeafId::new(NodeId::new(1), 0);
877
878 let op = LeafOp::Replace {
879 leaf: leaf_id,
880 new_content: b"world".to_vec(),
881 };
882 let result = apply_leaf_op(&mut txn, &mut context, branch_id, leaf_id, &op, b"world");
883
884 assert!(result.is_err());
885 assert!(result.unwrap_err().is_not_found());
886 }
887
888 #[test]
889 fn test_apply_replace_deleted() {

Callers

nothing calls this directly

Calls 1

apply_leaf_opFunction · 0.70

Tested by

no test coverage detected