(cg: CodeGraph, file: string, line: number)
| 153 | |
| 154 | /** `<qualified name>@<file>:<line>` of each call from the node at `file`:`line`. */ |
| 155 | const callsFrom = (cg: CodeGraph, file: string, line: number): string[] => { |
| 156 | const from = cg.getNodesInFile(file).find((n: Node) => n.startLine === line && (n.kind === 'method' || n.kind === 'function')); |
| 157 | expect(from, `${file}:${line}`).toBeDefined(); |
| 158 | return cg.getCallees(from!.id).filter((r) => r.edge.kind === 'calls') |
| 159 | .map((r) => `${r.node.qualifiedName}@${path.basename(r.node.filePath)}:${r.node.startLine}`) |
| 160 | .sort(); |
| 161 | }; |
| 162 | |
| 163 | const hpp = (needle: string): string => `counter.hpp:${lineOf(COUNTER_HPP, needle)}`; |
| 164 | const cpp = (needle: string): string => `counter.cpp:${lineOf(COUNTER_CPP, needle)}`; |
no test coverage detected