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

Function test_branch_id_encoding_ordering

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

Source from the content-addressed store, hash-verified

834
835 #[test]
836 fn test_branch_id_encoding_ordering() {
837 let id1 = BranchId::new(NodeId::new(1), 0);
838 let id2 = BranchId::new(NodeId::new(1), 1);
839 let id3 = BranchId::new(NodeId::new(2), 0);
840
841 let bytes1 = encode_branch_id(&id1);
842 let bytes2 = encode_branch_id(&id2);
843 let bytes3 = encode_branch_id(&id3);
844
845 assert!(bytes1 < bytes2);
846 assert!(bytes2 < bytes3);
847 }
848
849 #[test]
850 fn test_leaf_id_encoding_roundtrip() {

Callers

nothing calls this directly

Calls 1

encode_branch_idFunction · 0.85

Tested by

no test coverage detected