()
| 296 | |
| 297 | #[test] |
| 298 | fn group_by_buckets_by_dim_value() { |
| 299 | let t = tile(&[ |
| 300 | (0, Some(1.0)), |
| 301 | (1, Some(2.0)), |
| 302 | (0, Some(3.0)), |
| 303 | (1, Some(4.0)), |
| 304 | ]); |
| 305 | let g = group_by_dim(&t, 0, 0, Reducer::Sum); |
| 306 | assert_eq!(g.len(), 2); |
| 307 | // first-seen order: 0, then 1 |
| 308 | assert_eq!(g[0].key, CoordValue::Int64(0)); |
| 309 | assert_eq!(g[0].result.finalize(), Some(4.0)); |
| 310 | assert_eq!(g[1].key, CoordValue::Int64(1)); |
| 311 | assert_eq!(g[1].result.finalize(), Some(6.0)); |
| 312 | } |
| 313 | } |
nothing calls this directly
no test coverage detected