(t *testing.T)
| 185 | } |
| 186 | |
| 187 | func 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 | |
| 196 | func TestMap(t *testing.T) { |
| 197 | require.Equal(t, o.Map(o.Some(2), double), o.Some(4)) |