MCPcopy Create free account
hub / github.com/ReactiveX/RxGo / Test_Observable_WindowWithCount

Function Test_Observable_WindowWithCount

observable_operator_test.go:2267–2275  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2265}
2266
2267func Test_Observable_WindowWithCount(t *testing.T) {
2268 defer goleak.VerifyNone(t)
2269 ctx, cancel := context.WithCancel(context.Background())
2270 defer cancel()
2271 observe := testObservable(ctx, 1, 2, 3, 4, 5).WindowWithCount(2).Observe()
2272 Assert(ctx, t, (<-observe).V.(Observable), HasItems(1, 2))
2273 Assert(ctx, t, (<-observe).V.(Observable), HasItems(3, 4))
2274 Assert(ctx, t, (<-observe).V.(Observable), HasItems(5))
2275}
2276
2277func Test_Observable_WindowWithCount_ZeroCount(t *testing.T) {
2278 defer goleak.VerifyNone(t)

Callers

nothing calls this directly

Calls 5

testObservableFunction · 0.85
AssertFunction · 0.85
HasItemsFunction · 0.85
ObserveMethod · 0.65
WindowWithCountMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…