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

Function test_encoding_is_little_endian

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

Source from the content-addressed store, hash-verified

1288
1289 #[test]
1290 fn test_encoding_is_little_endian() {
1291 let id = TrunkId::new(NodeId::new(0x0102030405060708), 0x0A0B0C0D);
1292 let bytes = encode_trunk_id(&id);
1293
1294 // Verify little-endian encoding
1295 assert_eq!(bytes[0], 0x08); // LSB of change_id
1296 assert_eq!(bytes[7], 0x01); // MSB of change_id
1297 assert_eq!(bytes[8], 0x0D); // LSB of file_idx
1298 assert_eq!(bytes[11], 0x0A); // MSB of file_idx
1299 }
1300}

Callers

nothing calls this directly

Calls 1

encode_trunk_idFunction · 0.85

Tested by

no test coverage detected