(t *testing.T)
| 25 | } |
| 26 | |
| 27 | func TestSortPairsString(t *testing.T) { |
| 28 | pairs := []Pair[string, string]{ |
| 29 | {V1: "b", V2: "y"}, |
| 30 | {V1: "a", V2: "z"}, |
| 31 | {V1: "a", V2: "x"}, |
| 32 | {V1: "c", V2: "w"}, |
| 33 | } |
| 34 | expected := []Pair[string, string]{ |
| 35 | {V1: "a", V2: "x"}, |
| 36 | {V1: "a", V2: "z"}, |
| 37 | {V1: "b", V2: "y"}, |
| 38 | {V1: "c", V2: "w"}, |
| 39 | } |
| 40 | SortPairs(pairs) |
| 41 | if !reflect.DeepEqual(pairs, expected) { |
| 42 | t.Fatalf("expected %v, got %v", expected, pairs) |
| 43 | } |
| 44 | } |
nothing calls this directly
no test coverage detected