(t *testing.T)
| 934 | } |
| 935 | |
| 936 | func Test_Observable_GroupBy_Error(t *testing.T) { |
| 937 | defer goleak.VerifyNone(t) |
| 938 | ctx, cancel := context.WithCancel(context.Background()) |
| 939 | defer cancel() |
| 940 | length := 3 |
| 941 | count := 11 |
| 942 | |
| 943 | obs := Range(0, count).GroupBy(length, func(item Item) int { |
| 944 | return 4 |
| 945 | }, WithBufferedChannel(count)) |
| 946 | s, err := obs.ToSlice(0) |
| 947 | if err != nil { |
| 948 | assert.FailNow(t, err.Error()) |
| 949 | } |
| 950 | if len(s) != length { |
| 951 | assert.FailNow(t, "length", "got=%d, expected=%d", len(s), length) |
| 952 | } |
| 953 | |
| 954 | Assert(ctx, t, s[0].(Observable), HasAnError()) |
| 955 | Assert(ctx, t, s[1].(Observable), HasAnError()) |
| 956 | Assert(ctx, t, s[2].(Observable), HasAnError()) |
| 957 | } |
| 958 | |
| 959 | func Test_Observable_GroupByDynamic(t *testing.T) { |
| 960 | defer goleak.VerifyNone(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…