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

Function calls

__tests__/cpp-operator-arrow-targets.test.ts:126–131  ·  view source on GitHub ↗
(qualifiedName: string)

Source from the content-addressed store, hash-verified

124
125 /** `calls` callees of the function `qualifiedName`, as `qualifiedName`. */
126 const calls = (qualifiedName: string): string[] => {
127 const caller = cg.getNodesByKind('function').find((n: Node) => n.qualifiedName === qualifiedName);
128 expect(caller, qualifiedName).toBeDefined();
129 return cg.getCallees(caller!.id).filter((r) => r.edge.kind === 'calls').map((r) => r.node.qualifiedName)
130 .filter((q) => !q.endsWith('::begin')).sort();
131 };
132
133 it("a chain through an iterator class's operator->", () => {
134 expect(calls('ns::Chain')).toEqual(['ns::LookupKey::user_key']);

Calls 3

mapMethod · 0.80
getNodesByKindMethod · 0.65
getCalleesMethod · 0.45

Tested by

no test coverage detected