(t *testing.T)
| 282 | } |
| 283 | |
| 284 | func Test_Observable_BufferWithTime_Multiple(t *testing.T) { |
| 285 | defer goleak.VerifyNone(t) |
| 286 | ctx, cancel := context.WithCancel(context.Background()) |
| 287 | defer cancel() |
| 288 | ch := make(chan Item, 1) |
| 289 | obs := FromChannel(ch) |
| 290 | obs = obs.BufferWithTime(WithDuration(30 * time.Millisecond)) |
| 291 | go func() { |
| 292 | for i := 0; i < 10; i++ { |
| 293 | ch <- Of(i) |
| 294 | } |
| 295 | close(ch) |
| 296 | }() |
| 297 | Assert(ctx, t, obs, CustomPredicate(func(items []interface{}) error { |
| 298 | if len(items) == 0 { |
| 299 | return errors.New("items should not be nil") |
| 300 | } |
| 301 | return nil |
| 302 | })) |
| 303 | } |
| 304 | |
| 305 | func Test_Observable_BufferWithTimeOrCount(t *testing.T) { |
| 306 | defer goleak.VerifyNone(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…