MCPcopy
hub / github.com/colbymchenry/codegraph / instNames

Function instNames

__tests__/extraction.test.ts:3118–3121  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

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']);

Callers 1

extraction.test.tsFile · 0.85

Calls 1

extractFromSourceFunction · 0.90

Tested by

no test coverage detected