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

Function TestSomeUnwrapOrElse

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

Source from the content-addressed store, hash-verified

143}
144
145func TestSomeUnwrapOrElse(t *testing.T) {
146 require.Equal(t, o.Some(42).UnwrapOrElse(func() int { return 41 }), 42)
147}
148
149func TestNoneUnwrapOrElse(t *testing.T) {
150 require.Equal(t, o.None[int]().UnwrapOrElse(func() int { return 41 }), 41)

Callers

nothing calls this directly

Calls 2

EqualMethod · 0.80
UnwrapOrElseMethod · 0.80

Tested by

no test coverage detected