(t *testing.T)
| 7 | ) |
| 8 | |
| 9 | func TestConvertIntToString(t *testing.T) { |
| 10 | t.Parallel() |
| 11 | input := []int{1, 2, 3, 4, 5} |
| 12 | expected := []string{"1", "2", "3", "4", "5"} |
| 13 | result := Convert(input, strconv.Itoa) |
| 14 | |
| 15 | if len(result) != len(expected) { |
| 16 | t.Errorf("Expected length %d, got %d", len(expected), len(result)) |
| 17 | } |
| 18 | |
| 19 | for i := range expected { |
| 20 | if result[i] != expected[i] { |
| 21 | t.Errorf("At index %d: expected %v, got %v", i, expected[i], result[i]) |
| 22 | } |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | func TestConvertStringToInt(t *testing.T) { |
| 27 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…