MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / header_roundtrip

Function header_roundtrip

nodedb-columnar/src/format.rs:355–360  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

353
354 #[test]
355 fn header_roundtrip() {
356 let header = SegmentHeader::current();
357 let bytes = header.to_bytes();
358 let parsed = SegmentHeader::from_bytes(&bytes).expect("valid header");
359 assert_eq!(parsed, header);
360 }
361
362 #[test]
363 fn header_invalid_magic() {

Callers

nothing calls this directly

Calls 3

currentFunction · 0.85
to_bytesMethod · 0.45
expectMethod · 0.45

Tested by

no test coverage detected