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

Function calls

__tests__/cpp-pimpl-member-chains.test.ts:97–102  ·  view source on GitHub ↗
(qualifiedName: string)

Source from the content-addressed store, hash-verified

95
96 /** `calls` callees of the function or method `qualifiedName`, as `qualifiedName`. */
97 const calls = (qualifiedName: string): string[] => {
98 const caller = [...cg.getNodesByKind('function'), ...cg.getNodesByKind('method')]
99 .find((n: Node) => n.qualifiedName === qualifiedName);
100 expect(caller, qualifiedName).toBeDefined();
101 return cg.getCallees(caller!.id).filter((r) => r.edge.kind === 'calls').map((r) => r.node.qualifiedName).sort();
102 };
103
104 it("a member of the Rep a smart pointer holds, defined in the calling file", () => {
105 expect(calls('ns::Table::Size')).toEqual(['ns::Block::size']);

Callers 1

Calls 3

mapMethod · 0.80
getNodesByKindMethod · 0.65
getCalleesMethod · 0.45

Tested by

no test coverage detected