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

Function test_branch_value_encoding_roundtrip

atomic-core/src/crdt/tables.rs:976–988  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

974
975 #[test]
976 fn test_branch_value_encoding_roundtrip() {
977 let data = SerializedBranch {
978 trunk_id: TrunkId::new(NodeId::new(42), 5),
979 state: BranchState::Alive,
980 line_hash: 0x123456789ABCDEF0,
981 };
982
983 let bytes = encode_branch_value(&data);
984 assert_eq!(bytes.len(), 24);
985
986 let decoded = decode_branch_value(&bytes);
987 assert_eq!(data, decoded);
988 }
989
990 #[test]
991 fn test_branch_value_encoding_deleted_state() {

Callers

nothing calls this directly

Calls 2

encode_branch_valueFunction · 0.85
decode_branch_valueFunction · 0.85

Tested by

no test coverage detected