()
| 297 | |
| 298 | #[test] |
| 299 | fn raw_roundtrip() { |
| 300 | let data: Vec<f32> = (0..320).map(|i| i as f32 * 0.01).collect(); |
| 301 | let encoded = encode_raw(&data, 32, 10).unwrap(); |
| 302 | let (decoded, dims, vectors) = decode(&encoded).unwrap(); |
| 303 | assert_eq!(dims, 32); |
| 304 | assert_eq!(vectors, 10); |
| 305 | for (a, b) in data.iter().zip(decoded.iter()) { |
| 306 | assert_eq!(a.to_bits(), b.to_bits()); |
| 307 | } |
| 308 | } |
| 309 | |
| 310 | #[test] |
| 311 | fn compression_ratio() { |
nothing calls this directly
no test coverage detected