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

Function test_branch_op_delete

atomic-core/src/crdt/branch.rs:676–688  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

674
675 #[test]
676 fn test_branch_op_delete() {
677 let branch_id = BranchId::new(NodeId::new(1), 0);
678 let op = BranchOp::Delete {
679 branch: branch_id,
680 content: Vec::new(),
681 };
682 assert!(op.is_delete());
683 assert!(!op.is_insert());
684 assert_eq!(op.branch_id(), Some(branch_id));
685 assert_eq!(op.op_type(), "delete");
686 assert!(op.insert_after().is_none());
687 assert!(op.content().unwrap().is_empty());
688 }
689
690 #[test]
691 fn test_branch_op_restore() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected