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

Function body

__tests__/cpp-template-instantiations.test.ts:354–372  ·  view source on GitHub ↗
(code: string)

Source from the content-addressed store, hash-verified

352
353describe('a call on a value of the parameter\'s type', () => {
354 const body = (code: string): Record<string, string> => ({
355 'shards.h': lines(
356 'struct Inner { void Deep() {} };',
357 'struct FastShard { using Part = Inner; void Clear() {} };',
358 'struct SlowShard { using Part = Inner; void Clear() {} };',
359 ),
360 'cache.h': lines(
361 '#include "shards.h"',
362 'template <typename Shard>',
363 'class Cache {',
364 ' public:',
365 code,
366 ' private:',
367 ' Shard own_;',
368 ' Shard* many_;',
369 '};',
370 ),
371 'use.cc': lines('#include "cache.h"', 'Cache<FastShard> fast;', 'Cache<SlowShard> slow;'),
372 });
373 const CLEARS = ['FastShard::Clear', 'SlowShard::Clear'];
374
375 it.each([

Calls 1

linesFunction · 0.70

Tested by

no test coverage detected