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

Function from_bytes_rejects_bad_version

nodedb-codec/src/vector_quant/bbq.rs:353–358  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

351
352 #[test]
353 fn from_bytes_rejects_bad_version() {
354 let codec = BbqCodec::calibrate(&[], 4, 3);
355 let mut bytes = codec.to_bytes().unwrap();
356 bytes[5] = 42;
357 assert!(BbqCodec::from_bytes(&bytes).is_err());
358 }
359
360 #[test]
361 fn calibrate_centroid_mean() {

Callers

nothing calls this directly

Calls 1

to_bytesMethod · 0.45

Tested by

no test coverage detected