MCPcopy Index your code
hub / github.com/expr-lang/expr / addStringDumpTests

Function addStringDumpTests

internal/spew/dump_test.go:508–522  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

506}
507
508func addStringDumpTests() {
509 // Standard string.
510 v := "test"
511 vLen := fmt.Sprintf("%d", len(v))
512 nv := (*string)(nil)
513 pv := &v
514 vAddr := fmt.Sprintf("%p", pv)
515 pvAddr := fmt.Sprintf("%p", &pv)
516 vt := "string"
517 vs := "(len=" + vLen + ") \"test\""
518 addDumpTest(v, "("+vt+") "+vs+"\n")
519 addDumpTest(pv, "(*"+vt+")("+vAddr+")("+vs+")\n")
520 addDumpTest(&pv, "(**"+vt+")("+pvAddr+"->"+vAddr+")("+vs+")\n")
521 addDumpTest(nv, "(*"+vt+")(<nil>)\n")
522}
523
524func addInterfaceDumpTests() {
525 // Nil interface.

Callers 1

TestDumpFunction · 0.85

Calls 2

addDumpTestFunction · 0.85
SprintfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…