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

Function test_leaf_op_serde

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

Source from the content-addressed store, hash-verified

736
737 #[test]
738 fn test_leaf_op_serde() {
739 let op = LeafOp::Insert {
740 after: Some(LeafId::new(NodeId::new(1), 0)),
741 kind: TokenKind::String,
742 content: b"\"hello\"".to_vec(),
743 };
744 let json = serde_json::to_string(&op).unwrap();
745 let decoded: LeafOp = serde_json::from_str(&json).unwrap();
746 assert_eq!(op, decoded);
747 }
748
749 #[test]
750 fn test_leaf_op_replace_serde() {

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected