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

Function header_invalid_magic

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

Source from the content-addressed store, hash-verified

361
362 #[test]
363 fn header_invalid_magic() {
364 let mut bytes = SegmentHeader::current().to_bytes();
365 bytes[0] = b'X';
366 assert!(matches!(
367 SegmentHeader::from_bytes(&bytes),
368 Err(crate::error::ColumnarError::InvalidMagic(_))
369 ));
370 }
371
372 #[test]
373 fn header_incompatible_major() {

Callers

nothing calls this directly

Calls 2

currentFunction · 0.85
to_bytesMethod · 0.45

Tested by

no test coverage detected