(code: string)
| 3116 | // they emitted no constructor reference, unlike heap `new Calculator(0)`. An |
| 3117 | // `instantiates` ref to the constructed type is now emitted for both. |
| 3118 | const instNames = (code: string) => |
| 3119 | extractFromSource('f.cpp', `void run() {\n${code}\n}`) |
| 3120 | .unresolvedReferences.filter((r) => r.referenceKind === 'instantiates') |
| 3121 | .map((r) => r.referenceName); |
| 3122 | |
| 3123 | it('emits an instantiates ref for direct-init and brace-init', () => { |
| 3124 | expect(instNames('Calculator calc(0);')).toEqual(['Calculator']); |
no test coverage detected