(t *testing.T)
| 6 | ) |
| 7 | |
| 8 | func TestSortPairsInt(t *testing.T) { |
| 9 | pairs := []Pair[int, int]{ |
| 10 | {V1: 3, V2: 10}, |
| 11 | {V1: 1, V2: 20}, |
| 12 | {V1: 1, V2: 5}, |
| 13 | {V1: 2, V2: 15}, |
| 14 | } |
| 15 | expected := []Pair[int, int]{ |
| 16 | {V1: 1, V2: 5}, |
| 17 | {V1: 1, V2: 20}, |
| 18 | {V1: 2, V2: 15}, |
| 19 | {V1: 3, V2: 10}, |
| 20 | } |
| 21 | SortPairs(pairs) |
| 22 | if !reflect.DeepEqual(pairs, expected) { |
| 23 | t.Fatalf("expected %v, got %v", expected, pairs) |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | func TestSortPairsString(t *testing.T) { |
| 28 | pairs := []Pair[string, string]{ |
nothing calls this directly
no test coverage detected