MCPcopy Index your code
hub / github.com/bootdotdev/bootdev / TestTruncateAndStringifyBodyCapsBinaryBody

Function TestTruncateAndStringifyBodyCapsBinaryBody

checks/http_test.go:120–128  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

118}
119
120func TestTruncateAndStringifyBodyCapsBinaryBody(t *testing.T) {
121 body := []byte(strings.Repeat("a", 20*1024))
122 body[0] = 0
123
124 got := truncateAndStringifyBody(body)
125 if len(got) != 16*1024 {
126 t.Fatalf("len(truncateAndStringifyBody(binary)) = %d, want %d", len(got), 16*1024)
127 }
128}

Callers

nothing calls this directly

Calls 1

truncateAndStringifyBodyFunction · 0.85

Tested by

no test coverage detected