MCPcopy Create free account
hub / github.com/cli/cli / TestNoneUnwrapOr

Function TestNoneUnwrapOr

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

Source from the content-addressed store, hash-verified

139}
140
141func TestNoneUnwrapOr(t *testing.T) {
142 require.Equal(t, o.None[int]().UnwrapOr(3), 3)
143}
144
145func TestSomeUnwrapOrElse(t *testing.T) {
146 require.Equal(t, o.Some(42).UnwrapOrElse(func() int { return 41 }), 42)

Callers

nothing calls this directly

Calls 2

EqualMethod · 0.80
UnwrapOrMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…