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

Function rejects_bad_magic

nodedb-codec/src/vector_quant/codec_envelope.rs:102–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

100
101 #[test]
102 fn rejects_bad_magic() {
103 let bytes = encode(b"NDOTH", 1, &0u8).unwrap();
104 let err = decode::<u8>(MAGIC, 1, &bytes).unwrap_err();
105 matches!(err, CodecError::Corrupt { .. });
106 }
107
108 #[test]
109 fn rejects_version_mismatch() {

Callers

nothing calls this directly

Calls 1

encodeFunction · 0.70

Tested by

no test coverage detected