()
| 154 | |
| 155 | #[test] |
| 156 | fn f64_roundtrip() { |
| 157 | let values: Vec<f64> = (0..1000).map(|i| std::f64::consts::PI * i as f64).collect(); |
| 158 | let encoded = encode_f64(&values).unwrap(); |
| 159 | let decoded = decode_f64(&encoded).unwrap(); |
| 160 | assert_eq!(decoded.len(), values.len()); |
| 161 | for (a, b) in values.iter().zip(decoded.iter()) { |
| 162 | assert_eq!(a.to_bits(), b.to_bits(), "mismatch"); |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | #[test] |
| 167 | fn f64_compression_ratio() { |
nothing calls this directly
no test coverage detected