MCPcopy Create free account
hub / github.com/google/pprof / TestIndentation

Function TestIndentation

internal/report/source_test.go:218–236  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

216}
217
218func TestIndentation(t *testing.T) {
219 for _, c := range []struct {
220 str string
221 wantIndent int
222 }{
223 {"", 0},
224 {"foobar", 0},
225 {" foo", 2},
226 {"\tfoo", 8},
227 {"\t foo", 9},
228 {" \tfoo", 8},
229 {" \tfoo", 8},
230 {" \tfoo", 16},
231 } {
232 if n := indentation(c.str); n != c.wantIndent {
233 t.Errorf("indentation(%v): got %d, want %d", c.str, n, c.wantIndent)
234 }
235 }
236}
237
238func TestRightPad(t *testing.T) {
239 for _, c := range []struct {

Callers

nothing calls this directly

Calls 1

indentationFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…