()
| 748 | |
| 749 | #[test] |
| 750 | fn test_leaf_op_replace_serde() { |
| 751 | let op = LeafOp::Replace { |
| 752 | leaf: LeafId::new(NodeId::new(2), 3), |
| 753 | new_content: b"replaced".to_vec(), |
| 754 | }; |
| 755 | let json = serde_json::to_string(&op).unwrap(); |
| 756 | let decoded: LeafOp = serde_json::from_str(&json).unwrap(); |
| 757 | assert_eq!(op, decoded); |
| 758 | } |
| 759 | } |