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

Function TestColorString

example/color_test.go:20–27  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

18}
19
20func TestColorString(t *testing.T) {
21 x := Color(109)
22 assert.Equal(t, "Color(109)", x.String())
23
24 assert.Equal(t, Color(33), ColorGreen)
25 assert.Equal(t, Color(34), ColorBlue)
26 assert.Equal(t, &x, Color(109).Ptr())
27}
28
29func TestColorMustParse(t *testing.T) {
30 x := `avocadogreen`

Callers

nothing calls this directly

Calls 3

ColorTypeAlias · 0.70
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…