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

Function Test_Observable_AverageInt16

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

Source from the content-addressed store, hash-verified

176}
177
178func Test_Observable_AverageInt16(t *testing.T) {
179 defer goleak.VerifyNone(t)
180 ctx, cancel := context.WithCancel(context.Background())
181 defer cancel()
182 Assert(ctx, t, testObservable(ctx, int16(1), int16(2), int16(3)).AverageInt16(), HasItem(int16(2)))
183 Assert(ctx, t, testObservable(ctx, int16(1), int16(20)).AverageInt16(), HasItem(int16(10)))
184 Assert(ctx, t, Empty().AverageInt16(), HasItem(0))
185 Assert(ctx, t, testObservable(ctx, 1.1, 2.2, 3.3).AverageInt16(), HasAnError())
186}
187
188func Test_Observable_AverageInt32(t *testing.T) {
189 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
AverageInt16Method · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…