MCPcopy Create free account
hub / github.com/nodejs/node / testCallGraph

Method testCallGraph

deps/v8/tools/gcmole/gcmole_test.py:135–155  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

133 return call_graph
134
135 def testCallGraph(self):
136 call_graph = self.create_callgraph(OutputLines())
137 self.assertDictEqual(call_graph.funcs, {})
138
139 call_graph = self.create_callgraph(OutputLines('A →'))
140 self.assertDictEqual(call_graph.funcs, {'A': set()})
141
142 call_graph = self.create_callgraph(OutputLines('A → B'))
143 self.assertDictEqual(call_graph.funcs, {'A': set(), 'B': set('A')})
144
145 call_graph = self.create_callgraph(
146 OutputLines('A → B C', 'B → C D', 'D →'))
147 self.assertDictEqual(
148 call_graph.funcs,
149 {'A': set(), 'B': set('A'), 'C': set(['A', 'B']), 'D': set('B')})
150
151 call_graph = self.create_callgraph(
152 OutputLines('B → C D', 'D →'), OutputLines('A → B C'))
153 self.assertDictEqual(
154 call_graph.funcs,
155 {'A': set(), 'B': set('A'), 'C': set(['A', 'B']), 'D': set('B')})
156
157 def testCallGraphMerge(self):
158 """Test serializing, deserializing and merging call graphs."""

Callers

nothing calls this directly

Calls 3

create_callgraphMethod · 0.95
OutputLinesClass · 0.85
setFunction · 0.50

Tested by

no test coverage detected