()
| 374 | |
| 375 | #[test] |
| 376 | fn single_sample_roundtrip() { |
| 377 | let mut enc = GorillaEncoder::new(); |
| 378 | enc.encode(1000, 42.5); |
| 379 | let data = enc.finish(); |
| 380 | |
| 381 | let mut dec = GorillaDecoder::new(&data); |
| 382 | let (ts, val) = dec.next_sample().unwrap(); |
| 383 | assert_eq!(ts, 1000); |
| 384 | assert!((val - 42.5).abs() < f64::EPSILON); |
| 385 | assert!(dec.next_sample().is_none()); |
| 386 | } |
| 387 | |
| 388 | #[test] |
| 389 | fn monotonic_timestamps_compress_well() { |
nothing calls this directly
no test coverage detected