MCPcopy
hub / github.com/derailed/k9s / TestColorToColor

Function TestColorToColor

internal/config/color_test.go:95–121  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

93}
94
95func TestColorToColor(t *testing.T) {
96 uu := map[string]struct {
97 c string
98 e tcell.Color
99 }{
100 "default": {
101 c: "default",
102 e: tcell.ColorDefault,
103 },
104 "transparent": {
105 c: "-",
106 e: tcell.ColorDefault,
107 },
108 "aqua": {
109 c: "aqua",
110 e: tcell.ColorAqua.TrueColor(),
111 },
112 }
113
114 for k := range uu {
115 u := uu[k]
116 t.Run(k, func(t *testing.T) {
117 c := config.NewColor(u.c)
118 assert.Equal(t, u.e, c.Color())
119 })
120 }
121}
122
123// getOkch returns c, h for a hex color string.
124func getOkch(hex string) (c, h float64) {

Callers

nothing calls this directly

Calls 3

ColorMethod · 0.95
NewColorFunction · 0.92
RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…