(cg: CodeGraph, file: string, line: number, name: string)
| 18 | |
| 19 | /** What `file` links `name` to on `line`, as `kind qualifiedName file@line`, sorted. */ |
| 20 | const targetsOn = (cg: CodeGraph, file: string, line: number, name: string): string[] => { |
| 21 | const out: string[] = []; |
| 22 | for (const node of cg.getNodesInFile(file)) { |
| 23 | for (const edge of cg.getOutgoingEdges(node.id)) { |
| 24 | if (edge.line !== line) continue; |
| 25 | const target = cg.getNode(edge.target)!; |
| 26 | if (target.name === name) out.push(`${target.kind} ${target.qualifiedName} ${target.filePath}@${target.startLine}`); |
| 27 | } |
| 28 | } |
| 29 | return [...new Set(out)].sort(); |
| 30 | }; |
| 31 | |
| 32 | describe('a Rust path into another module, type or crate', () => { |
| 33 | let root = ''; |
no test coverage detected