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

Function test_branch_id_serde

atomic-core/src/crdt/ids.rs:396–401  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

394
395 #[test]
396 fn test_branch_id_serde() {
397 let id = BranchId::new(NodeId::new(100), 7);
398 let json = serde_json::to_string(&id).unwrap();
399 let decoded: BranchId = serde_json::from_str(&json).unwrap();
400 assert_eq!(id, decoded);
401 }
402
403 // -------------------------------------------------------------------------
404 // LeafId Tests

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected