()
| 170 | |
| 171 | #[test] |
| 172 | fn multiple_series() { |
| 173 | let mut cache = LastValueCache::new(); |
| 174 | cache.update(sid(1), 100, 1.0); |
| 175 | cache.update(sid(2), 200, 2.0); |
| 176 | cache.update(sid(3), 300, 3.0); |
| 177 | |
| 178 | assert_eq!(cache.len(), 3); |
| 179 | assert!((cache.get(sid(2)).unwrap().value - 2.0).abs() < 1e-12); |
| 180 | } |
| 181 | |
| 182 | #[test] |
| 183 | fn all_returns_all_entries() { |