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

Function TestComposeWithNodeAttributesAndZeroFlat

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

Source from the content-addressed store, hash-verified

41}
42
43func TestComposeWithNodeAttributesAndZeroFlat(t *testing.T) {
44 g := baseGraph()
45 a, c := baseAttrsAndConfig()
46
47 // Set NodeAttributes for Node 1.
48 a.Nodes[g.Nodes[0]] = &DotNodeAttributes{
49 Shape: "folder",
50 Bold: true,
51 Peripheries: 2,
52 URL: "www.google.com",
53 Formatter: func(ni *NodeInfo) string {
54 return strings.ToUpper(ni.Name)
55 },
56 }
57
58 // Set Flat value to zero on Node 2.
59 g.Nodes[1].Flat = 0
60
61 var buf bytes.Buffer
62 ComposeDot(&buf, g, a, c)
63
64 compareGraphs(t, buf.Bytes(), "compose2.dot")
65}
66
67func TestComposeWithTagsAndResidualEdge(t *testing.T) {
68 g := baseGraph()

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…