(t *testing.T)
| 21 | } |
| 22 | |
| 23 | func TestGroupByKeyMap(t *testing.T) { |
| 24 | dataset := New().Slice( |
| 25 | []int{1, 1, 2, 2, 3, 3}, |
| 26 | ).Map(func(t int) (int, int) { |
| 27 | return t, t * 2 |
| 28 | }).GroupByKey().Map(func(key int, values []int) []int { |
| 29 | return append([]int{key}, values...) |
| 30 | }) |
| 31 | |
| 32 | got := collectOutput(dataset) |
| 33 | |
| 34 | if want := [][]int{{1, 2, 2}, {2, 4, 4}, {3, 6, 6}}; !reflect.DeepEqual(got, want) { |
| 35 | t.Errorf("Got %v want %v", got, want) |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func TestCoGroupMap(t *testing.T) { |
| 40 | f := New() |
nothing calls this directly
no test coverage detected