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

Function deduced

__tests__/cpp-template-instantiations.test.ts:420–430  ·  view source on GitHub ↗
(use: string)

Source from the content-addressed store, hash-verified

418
419describe('a deduced argument', () => {
420 const deduced = (use: string): Promise<CodeGraph> => indexed({
421 'txn.h': TXN,
422 'run.cc': lines(
423 '#include "txn.h"',
424 'template <typename T> void ByValue(T x) { T::Make(); }',
425 'template <typename T> void ByRef(const T& x) { T::Make(); }',
426 'template <typename T> void ByPointer(T* x) { T::Make(); }',
427 'template <typename T> void ByHolder(std::vector<T>* x) { T::Make(); }',
428 use,
429 ),
430 });
431
432 it('reads the type of a declared argument, whole', async () => {
433 const cg = await deduced('void Run() { PlainTxn p; ByValue(p); ByRef(p); }');

Calls 2

indexedFunction · 0.70
linesFunction · 0.70

Tested by

no test coverage detected