(caller: string, name: string)
| 150 | |
| 151 | /** The `name` overloads a function calls, as `name:startLine`. */ |
| 152 | const calls = (caller: string, name: string): string[] => { |
| 153 | const fn = cg.getNodesByKind('function').find((n: Node) => n.name === caller); |
| 154 | expect(fn, caller).toBeDefined(); |
| 155 | return cg.getCallees(fn!.id).filter((r) => r.edge.kind === 'calls' && r.node.name === name).map((r) => `${r.node.name}:${r.node.startLine}`); |
| 156 | }; |
| 157 | |
| 158 | it('a pointer to a non-const object takes the non-const overload, to a const one the const overload', () => { |
| 159 | expect(calls('NonConstHolder', 'DynamicCastMessage')).toEqual(['DynamicCastMessage:10']); |
no test coverage detected