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

Function Test_Observable_AverageInt32

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

Source from the content-addressed store, hash-verified

186}
187
188func Test_Observable_AverageInt32(t *testing.T) {
189 defer goleak.VerifyNone(t)
190 ctx, cancel := context.WithCancel(context.Background())
191 defer cancel()
192 Assert(ctx, t, testObservable(ctx, int32(1), int32(2), int32(3)).AverageInt32(), HasItem(int32(2)))
193 Assert(ctx, t, testObservable(ctx, int32(1), int32(20)).AverageInt32(), HasItem(int32(10)))
194 Assert(ctx, t, Empty().AverageInt32(), HasItem(0))
195 Assert(ctx, t, testObservable(ctx, 1.1, 2.2, 3.3).AverageInt32(), HasAnError())
196}
197
198func Test_Observable_AverageInt64(t *testing.T) {
199 defer goleak.VerifyNone(t)

Callers

nothing calls this directly

Calls 6

AssertFunction · 0.85
testObservableFunction · 0.85
HasItemFunction · 0.85
EmptyFunction · 0.85
HasAnErrorFunction · 0.85
AverageInt32Method · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…