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

Function Test_Defer

factory_test.go:175–183  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

173}
174
175func Test_Defer(t *testing.T) {
176 defer goleak.VerifyNone(t)
177 obs := Defer([]Producer{func(ctx context.Context, next chan<- Item) {
178 next <- Of(1)
179 next <- Of(2)
180 next <- Of(3)
181 }})
182 Assert(context.Background(), t, obs, HasItems(1, 2, 3), HasNoError())
183}
184
185func Test_Defer_Multiple(t *testing.T) {
186 defer goleak.VerifyNone(t)

Callers

nothing calls this directly

Calls 5

DeferFunction · 0.85
OfFunction · 0.85
AssertFunction · 0.85
HasItemsFunction · 0.85
HasNoErrorFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…