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

Function TestComposeWithCommentsWithNewlines

internal/graph/dotgraph_test.go:153–164  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

151}
152
153func TestComposeWithCommentsWithNewlines(t *testing.T) {
154 g := baseGraph()
155 a, c := baseAttrsAndConfig()
156 // comments that could be added with the -add_comment command line tool
157 // the first label is used as the dot "node name"; the others are escaped as labels
158 c.Labels = []string{"comment line 1\ncomment line 2 \"unterminated double quote", `second comment "double quote"`}
159
160 var buf bytes.Buffer
161 ComposeDot(&buf, g, a, c)
162
163 compareGraphs(t, buf.Bytes(), "compose9.dot")
164}
165
166func baseGraph() *Graph {
167 src := &Node{

Callers

nothing calls this directly

Calls 4

baseGraphFunction · 0.85
baseAttrsAndConfigFunction · 0.85
ComposeDotFunction · 0.85
compareGraphsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…