MCPcopy
hub / github.com/pterm/pterm / TestRGB_Printf

Function TestRGB_Printf

rgb_test.go:170–181  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

168}
169
170func TestRGB_Printf(t *testing.T) {
171 RGBs := []pterm.RGB{{0, 0, 0, false}, {127, 127, 127, false}, {255, 255, 255, false}}
172
173 for _, rgb := range RGBs {
174 t.Run(pterm.Sprintf("%v %v %v", rgb.R, rgb.G, rgb.B), func(t *testing.T) {
175 testPrintfContains(t, func(w io.Writer, format string, a any) {
176 p := rgb.Printf(format, a)
177 testza.AssertNotNil(t, p)
178 })
179 })
180 }
181}
182
183func TestRGB_Printfln(t *testing.T) {
184 RGBs := []pterm.RGB{{0, 0, 0, false}, {127, 127, 127, false}, {255, 255, 255, false}}

Callers

nothing calls this directly

Calls 3

SprintfFunction · 0.92
testPrintfContainsFunction · 0.85
PrintfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…