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

Function TestRenderSlice_WithTitleDepth2

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

Source from the content-addressed store, hash-verified

78}
79
80func TestRenderSlice_WithTitleDepth2(t *testing.T) {
81 var output strings.Builder
82 data := []int{10, 20}
83 val := reflect.ValueOf(data)
84
85 renderSlice(val, "Deep List", &output, 2)
86
87 result := output.String()
88 // Depth 2 should use ### header (depth + 1 = 3 hashes)
89 if !strings.Contains(result, "### Deep List") {
90 t.Errorf("Output should contain '### Deep List' header, got: %q", result)
91 }
92}
93
94func TestRenderSlice_SimpleTypesAsList(t *testing.T) {
95 tests := []struct {

Callers

nothing calls this directly

Calls 3

renderSliceFunction · 0.85
StringMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected