MCPcopy
hub / github.com/duke-git/lancet / TestOf

Function TestOf

datastructure/optional/optional_test.go:17–24  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15}
16
17func TestOf(t *testing.T) {
18 assert := internal.NewAssert(t, "TestOf")
19 value := 42
20 opt := Of(value)
21
22 assert.ShouldBeTrue(opt.IsNotNil())
23 assert.Equal(opt.Unwarp(), value)
24}
25
26func TestFromNillable(t *testing.T) {
27 assert := internal.NewAssert(t, "TestOfNullable")

Callers

nothing calls this directly

Calls 6

ShouldBeTrueMethod · 0.95
EqualMethod · 0.95
NewAssertFunction · 0.92
UnwarpMethod · 0.80
OfFunction · 0.70
IsNotNilMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…