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

Function test_leaf_op_replace

atomic-core/src/crdt/leaf.rs:674–686  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

672
673 #[test]
674 fn test_leaf_op_replace() {
675 let leaf_id = LeafId::new(NodeId::new(1), 0);
676 let op = LeafOp::Replace {
677 leaf: leaf_id,
678 new_content: b"world".to_vec(),
679 };
680 assert!(op.is_replace());
681 assert!(!op.is_delete());
682 assert_eq!(op.leaf_id(), Some(leaf_id));
683 assert_eq!(op.op_type(), "replace");
684 assert_eq!(op.content(), Some(&b"world"[..]));
685 assert_eq!(op.content_len(), 5);
686 }
687
688 #[test]
689 fn test_leaf_op_restore() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected