(t testing.TB)
| 19 | ) |
| 20 | |
| 21 | func testLabelNames(t testing.TB) { |
| 22 | scenarios := []struct { |
| 23 | in LabelNames |
| 24 | out LabelNames |
| 25 | }{ |
| 26 | { |
| 27 | in: LabelNames{"ZZZ", "zzz"}, |
| 28 | out: LabelNames{"ZZZ", "zzz"}, |
| 29 | }, |
| 30 | { |
| 31 | in: LabelNames{"aaa", "AAA"}, |
| 32 | out: LabelNames{"AAA", "aaa"}, |
| 33 | }, |
| 34 | } |
| 35 | |
| 36 | for i, scenario := range scenarios { |
| 37 | sort.Sort(scenario.in) |
| 38 | |
| 39 | for j, expected := range scenario.out { |
| 40 | if expected != scenario.in[j] { |
| 41 | t.Errorf("%d.%d expected %s, got %s", i, j, expected, scenario.in[j]) |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func TestLabelNames(t *testing.T) { |
| 48 | testLabelNames(t) |
no outgoing calls
no test coverage detected