MCPcopy Create free account
hub / github.com/abice/go-enum / TestStrState

Function TestStrState

example/strings_only_test.go:14–21  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

12)
13
14func TestStrState(t *testing.T) {
15 x := StrState("")
16 assert.Equal(t, "", x.String())
17
18 assert.Equal(t, StrState("pending"), StrStatePending)
19 assert.Equal(t, StrState("running"), StrStateRunning)
20 assert.Equal(t, &x, StrState("").Ptr())
21}
22
23func TestStrStateMustParse(t *testing.T) {
24 x := `avocado`

Callers

nothing calls this directly

Calls 3

StrStateTypeAlias · 0.85
StringMethod · 0.45
PtrMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…