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

Function TestRenderSlice_NoTitle

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

Source from the content-addressed store, hash-verified

28}
29
30func TestRenderSlice_NoTitle(t *testing.T) {
31 var output strings.Builder
32 data := []int{1, 2, 3}
33 val := reflect.ValueOf(data)
34
35 renderSlice(val, "", &output, 0)
36
37 result := output.String()
38 // Should not have title header
39 if strings.Contains(result, "#") {
40 t.Errorf("Output with no title should not contain header markers, got: %q", result)
41 }
42 // Should have list items
43 if !strings.Contains(result, "•") {
44 t.Error("Output should contain list bullet points")
45 }
46}
47
48func TestRenderSlice_WithTitleDepth0(t *testing.T) {
49 var output strings.Builder

Callers

nothing calls this directly

Calls 4

renderSliceFunction · 0.85
StringMethod · 0.45
ErrorfMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected