(t *testing.T)
| 255 | } |
| 256 | |
| 257 | func TestVectorSort(t *testing.T) { |
| 258 | input := Vector{ |
| 259 | &Sample{ |
| 260 | Metric: Metric{ |
| 261 | MetricNameLabel: "A", |
| 262 | }, |
| 263 | Timestamp: 1, |
| 264 | }, |
| 265 | &Sample{ |
| 266 | Metric: Metric{ |
| 267 | MetricNameLabel: "A", |
| 268 | }, |
| 269 | Timestamp: 2, |
| 270 | }, |
| 271 | &Sample{ |
| 272 | Metric: Metric{ |
| 273 | MetricNameLabel: "C", |
| 274 | }, |
| 275 | Timestamp: 1, |
| 276 | }, |
| 277 | &Sample{ |
| 278 | Metric: Metric{ |
| 279 | MetricNameLabel: "C", |
| 280 | }, |
| 281 | Timestamp: 2, |
| 282 | }, |
| 283 | &Sample{ |
| 284 | Metric: Metric{ |
| 285 | MetricNameLabel: "B", |
| 286 | }, |
| 287 | Timestamp: 3, |
| 288 | }, |
| 289 | &Sample{ |
| 290 | Metric: Metric{ |
| 291 | MetricNameLabel: "B", |
| 292 | }, |
| 293 | Timestamp: 2, |
| 294 | }, |
| 295 | &Sample{ |
| 296 | Metric: Metric{ |
| 297 | MetricNameLabel: "B", |
| 298 | }, |
| 299 | Timestamp: 1, |
| 300 | }, |
| 301 | } |
| 302 | |
| 303 | expected := Vector{ |
| 304 | &Sample{ |
| 305 | Metric: Metric{ |
| 306 | MetricNameLabel: "A", |
| 307 | }, |
| 308 | Timestamp: 1, |
| 309 | }, |
| 310 | &Sample{ |
| 311 | Metric: Metric{ |
| 312 | MetricNameLabel: "A", |
| 313 | }, |
| 314 | Timestamp: 2, |
nothing calls this directly
no test coverage detected