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

Function Test_Observable_AverageInt8

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

Source from the content-addressed store, hash-verified

166}
167
168func Test_Observable_AverageInt8(t *testing.T) {
169 defer goleak.VerifyNone(t)
170 ctx, cancel := context.WithCancel(context.Background())
171 defer cancel()
172 Assert(ctx, t, testObservable(ctx, int8(1), int8(2), int8(3)).AverageInt8(), HasItem(int8(2)))
173 Assert(ctx, t, testObservable(ctx, int8(1), int8(20)).AverageInt8(), HasItem(int8(10)))
174 Assert(ctx, t, Empty().AverageInt8(), HasItem(0))
175 Assert(ctx, t, testObservable(ctx, 1.1, 2.2, 3.3).AverageInt8(), HasAnError())
176}
177
178func Test_Observable_AverageInt16(t *testing.T) {
179 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
AverageInt8Method · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…