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

Function test_leaf_id_encoding_ordering

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

Source from the content-addressed store, hash-verified

865
866 #[test]
867 fn test_leaf_id_encoding_ordering() {
868 let id1 = LeafId::new(NodeId::new(1), 0);
869 let id2 = LeafId::new(NodeId::new(1), 1);
870 let id3 = LeafId::new(NodeId::new(2), 0);
871
872 let bytes1 = encode_leaf_id(&id1);
873 let bytes2 = encode_leaf_id(&id2);
874 let bytes3 = encode_leaf_id(&id3);
875
876 assert!(bytes1 < bytes2);
877 assert!(bytes2 < bytes3);
878 }
879
880 // -------------------------------------------------------------------------
881 // State Encoding Tests

Callers

nothing calls this directly

Calls 1

encode_leaf_idFunction · 0.85

Tested by

no test coverage detected