MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / overrides

Function overrides

__tests__/cpp-base-class-lookup.test.ts:481–486  ·  view source on GitHub ↗
(qualifiedName: string, file: string)

Source from the content-addressed store, hash-verified

479describe('what the hierarchy feeds', () => {
480 it('links each base method to the overrides of the right subclasses', () => {
481 const overrides = (qualifiedName: string, file: string): string[] =>
482 cg
483 .getOutgoingEdgesFrom([node(qualifiedName, file).id], ['calls'])
484 .filter((e) => e.metadata?.synthesizedBy === 'cpp-override')
485 .map((e) => cg.getNode(e.target)?.qualifiedName ?? '')
486 .sort();
487 expect(overrides('leveldb::Iterator::Next', 'include/leveldb/iterator.h')).toEqual(['leveldb::DBIter::Next']);
488 expect(overrides('leveldb::SkipList::Iterator::Next', 'db/skiplist.h')).toEqual([]);
489 expect(overrides('google::protobuf::Message::ByteSizeLong', 'src/google/protobuf/message.h')).toEqual([

Callers 1

Calls 4

mapMethod · 0.80
getNodeMethod · 0.80
nodeFunction · 0.70
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected