(code: string)
| 4666 | // "& getRef() const" instead of "getRef", polluting search and callers. Very |
| 4667 | // common in Unreal Engine headers (`const FGameplayTagContainer& GetActiveTags() const`). |
| 4668 | const namesOf = (code: string) => |
| 4669 | extractFromSource('r.cpp', code).nodes |
| 4670 | .filter((n) => n.kind === 'method' || n.kind === 'function') |
| 4671 | .map((n) => n.name); |
| 4672 | |
| 4673 | it('names an inline reference-returning method by its identifier, not the declarator', () => { |
| 4674 | const names = namesOf('class C {\npublic:\n const int& getRef() const { return x; }\n int& mutRef() { return x; }\n int x;\n};'); |
no test coverage detected