(t *testing.T)
| 76 | } |
| 77 | |
| 78 | func TestMap(t *testing.T) { |
| 79 | t.Parallel() |
| 80 | |
| 81 | result1 := Map([]int{1, 2, 3, 4}, func(x int) string { |
| 82 | return "Hello" |
| 83 | }) |
| 84 | result2 := Map([]int64{1, 2, 3, 4}, func(x int64) string { |
| 85 | return strconv.FormatInt(x, 10) |
| 86 | }) |
| 87 | |
| 88 | require.Len(t, result1, 4) |
| 89 | require.Len(t, result2, 4) |
| 90 | require.Equal(t, []string{"Hello", "Hello", "Hello", "Hello"}, result1) |
| 91 | require.Equal(t, []string{"1", "2", "3", "4"}, result2) |
| 92 | } |
| 93 | |
| 94 | func TestMapError(t *testing.T) { |
| 95 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…