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

Function test_leaf_op_replace_serde

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

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected