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

Function made

__tests__/cpp-written-scope-class-names.test.ts:489–490  ·  view source on GitHub ↗
(callers: Node[])

Source from the content-addressed store, hash-verified

487 // (Recorded by the name before its first `<`, `Outer`.)
488 expect(targets(cg, 'rocksdb::WriterTest::Make', 'instantiates')).toEqual(['rocksdb::Outer::Inner @0.9', 'rocksdb::Outer::Inner @0.9']);
489 const made = (callers: Node[]): string[][] => callers.sort((a, b) => a.startLine - b.startLine)
490 .map((fn) => cg.getOutgoingEdgesFrom([fn.id], ['instantiates']).map((e) => `${fn.startLine} -> ${cg.getNode(e.target)?.startLine}`).sort());
491 expect(made(cg.getNodesByKind('function').filter((n) => n.name === 'TEST_F'))).toEqual([['13 -> 14'], ['20 -> 21']]);
492 expect(made(cg.getNodesByKind('method').filter((n) => n.filePath === 'gmock/gmock.h')))
493 .toEqual([['13 -> 6', '13 -> 7'], ['19 -> 17', '19 -> 18']]);

Calls 3

mapMethod · 0.80
getNodeMethod · 0.80
getOutgoingEdgesFromMethod · 0.45

Tested by

no test coverage detected