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

Function test_trunk_id_serde

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

Source from the content-addressed store, hash-verified

344
345 #[test]
346 fn test_trunk_id_serde() {
347 let id = TrunkId::new(NodeId::new(100), 7);
348 let json = serde_json::to_string(&id).unwrap();
349 let decoded: TrunkId = serde_json::from_str(&json).unwrap();
350 assert_eq!(id, decoded);
351 }
352
353 // -------------------------------------------------------------------------
354 // BranchId Tests

Callers

nothing calls this directly

Calls 1

unwrapMethod · 0.45

Tested by

no test coverage detected