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

Function Test_Observable_DefaultIfEmpty_Empty

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

Source from the content-addressed store, hash-verified

399}
400
401func Test_Observable_DefaultIfEmpty_Empty(t *testing.T) {
402 defer goleak.VerifyNone(t)
403 ctx, cancel := context.WithCancel(context.Background())
404 defer cancel()
405 obs := Empty().DefaultIfEmpty(3)
406 Assert(ctx, t, obs, HasItems(3))
407}
408
409func Test_Observable_DefaultIfEmpty_NotEmpty(t *testing.T) {
410 defer goleak.VerifyNone(t)

Callers

nothing calls this directly

Calls 4

EmptyFunction · 0.85
AssertFunction · 0.85
HasItemsFunction · 0.85
DefaultIfEmptyMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…