(code: string)
| 2872 | // "& getRef() const" instead of "getRef", polluting search and callers. Very |
| 2873 | // common in Unreal Engine headers (`const FGameplayTagContainer& GetActiveTags() const`). |
| 2874 | const namesOf = (code: string) => |
| 2875 | extractFromSource('r.cpp', code).nodes |
| 2876 | .filter((n) => n.kind === 'method' || n.kind === 'function') |
| 2877 | .map((n) => n.name); |
| 2878 | |
| 2879 | it('names an inline reference-returning method by its identifier, not the declarator', () => { |
| 2880 | 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