MCPcopy
hub / github.com/cli/cli / TestNoneExpect

Function TestNoneExpect

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

Source from the content-addressed store, hash-verified

185}
186
187func TestNoneExpect(t *testing.T) {
188 defer func() {
189 require.Equal(t, fmt.Sprint(recover()), "oops")
190 }()
191
192 o.None[int]().Expect("oops")
193 t.Error("did not panic")
194}
195
196func TestMap(t *testing.T) {
197 require.Equal(t, o.Map(o.Some(2), double), o.Some(4))

Callers

nothing calls this directly

Calls 3

EqualMethod · 0.80
ExpectMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected