MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / calls

Function calls

__tests__/cpp-free-function-overloads.test.ts:199–204  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

197
198 /** `<qualified name>@<file>:<line>` of what the function `name` calls. */
199 const calls = (name: string): string[] => {
200 const caller = cg.getNodesByKind('function').find((n: Node) => n.qualifiedName === name)!;
201 expect(caller, name).toBeDefined();
202 return cg.getCallees(caller.id).filter((r) => r.edge.kind === 'calls')
203 .map((r) => `${r.node.qualifiedName}@${path.basename(r.node.filePath)}:${r.node.startLine}`);
204 };
205
206 it('by the types of its arguments', () => {
207 expect(calls('pb::Parse32')).toEqual(['pb::ParseWithLimit@varint.cc:2']);

Calls 3

mapMethod · 0.80
getNodesByKindMethod · 0.65
getCalleesMethod · 0.45

Tested by

no test coverage detected