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