MCPcopy Index your code
hub / github.com/cli/cli / TestNoneUnwrapOrElse

Function TestNoneUnwrapOrElse

pkg/option/option_test.go:149–151  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

147}
148
149func TestNoneUnwrapOrElse(t *testing.T) {
150 require.Equal(t, o.None[int]().UnwrapOrElse(func() int { return 41 }), 41)
151}
152
153func TestSomeUnwrapOrZero(t *testing.T) {
154 require.Equal(t, o.Some(42).UnwrapOrZero(), 42)

Callers

nothing calls this directly

Calls 2

EqualMethod · 0.80
UnwrapOrElseMethod · 0.80

Tested by

no test coverage detected