MCPcopy Create free account
hub / github.com/github/gh-aw / TestRenderSlice_EmptySlice

Function TestRenderSlice_EmptySlice

pkg/console/render_slice_test.go:17–28  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

15}
16
17func TestRenderSlice_EmptySlice(t *testing.T) {
18 var output strings.Builder
19 emptySlice := []int{}
20 val := reflect.ValueOf(emptySlice)
21
22 renderSlice(val, "Empty List", &output, 0)
23
24 // Empty slice should produce no output
25 if output.String() != "" {
26 t.Errorf("Empty slice should produce no output, got: %q", output.String())
27 }
28}
29
30func TestRenderSlice_NoTitle(t *testing.T) {
31 var output strings.Builder

Callers

nothing calls this directly

Calls 3

renderSliceFunction · 0.85
StringMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected