(t *testing.T)
| 303 | } |
| 304 | |
| 305 | func Test_Observable_BufferWithTimeOrCount(t *testing.T) { |
| 306 | defer goleak.VerifyNone(t) |
| 307 | ctx, cancel := context.WithCancel(context.Background()) |
| 308 | defer cancel() |
| 309 | ch := make(chan Item, 1) |
| 310 | obs := FromChannel(ch) |
| 311 | obs = obs.BufferWithTimeOrCount(WithDuration(30*time.Millisecond), 100) |
| 312 | go func() { |
| 313 | for i := 0; i < 10; i++ { |
| 314 | ch <- Of(i) |
| 315 | } |
| 316 | close(ch) |
| 317 | }() |
| 318 | Assert(ctx, t, obs, CustomPredicate(func(items []interface{}) error { |
| 319 | if len(items) == 0 { |
| 320 | return errors.New("items should not be nil") |
| 321 | } |
| 322 | return nil |
| 323 | })) |
| 324 | } |
| 325 | |
| 326 | func Test_Observable_Contain(t *testing.T) { |
| 327 | defer goleak.VerifyNone(t) |
nothing calls this directly
no test coverage detected
searching dependent graphs…