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

Function Test_Observable_Scan_Parallel

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

Source from the content-addressed store, hash-verified

1700}
1701
1702func Test_Observable_Scan_Parallel(t *testing.T) {
1703 defer goleak.VerifyNone(t)
1704 ctx, cancel := context.WithCancel(context.Background())
1705 defer cancel()
1706 obs := testObservable(ctx, 1, 2, 3, 4, 5).Scan(func(_ context.Context, x, y interface{}) (interface{}, error) {
1707 if x == nil {
1708 return y, nil
1709 }
1710 return x.(int) + y.(int), nil
1711 }, WithCPUPool())
1712 Assert(ctx, t, obs, HasItemsNoOrder(1, 3, 6, 10, 15))
1713}
1714
1715func Test_Observable_SequenceEqual_EvenSequence(t *testing.T) {
1716 defer goleak.VerifyNone(t)

Callers

nothing calls this directly

Calls 5

testObservableFunction · 0.85
WithCPUPoolFunction · 0.85
AssertFunction · 0.85
HasItemsNoOrderFunction · 0.85
ScanMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…