()
| 191 | |
| 192 | #[test] |
| 193 | fn remove_series() { |
| 194 | let mut cache = LastValueCache::new(); |
| 195 | let sid = sid(1); |
| 196 | cache.update(sid, 100, 10.0); |
| 197 | assert!(cache.remove(sid)); |
| 198 | assert!(cache.get(sid).is_none()); |
| 199 | assert!(!cache.remove(sid)); // Already removed. |
| 200 | } |
| 201 | |
| 202 | #[test] |
| 203 | fn clear_cache() { |