()
| 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() { |
nothing calls this directly
no outgoing calls
no test coverage detected