()
| 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() { |