mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-03 02:21:44 +00:00
test(ingestion): drop unused helper in cfg-snapshot test (#2081)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d19b4ca639
commit
c57bbb05a0
1 changed files with 2 additions and 9 deletions
|
|
@ -98,17 +98,10 @@ describe('U7 — AC2: every BasicBlock reachable from its function ENTRY', () =>
|
|||
});
|
||||
|
||||
describe('U7 — AC3: hazard topologies', () => {
|
||||
const byStart = (cfgs: readonly FunctionCfg[], minBlocks = 0): FunctionCfg =>
|
||||
cfgs.reduce(
|
||||
(best, c) =>
|
||||
c.blocks.length >= minBlocks && c.blocks.length > best.blocks.length ? c : best,
|
||||
cfgs[0],
|
||||
);
|
||||
|
||||
function blockAdj(cfg: FunctionCfg): { adj: Map<number, number[]>; text: (i: number) => string } {
|
||||
function blockAdj(cfg: FunctionCfg): { adj: Map<number, number[]> } {
|
||||
const adj = new Map<number, number[]>();
|
||||
for (const e of cfg.edges) (adj.get(e.from) ?? adj.set(e.from, []).get(e.from)!).push(e.to);
|
||||
return { adj, text: (i) => cfg.blocks[i]?.text ?? '' };
|
||||
return { adj };
|
||||
}
|
||||
const blockWith = (cfg: FunctionCfg, sub: string): number => {
|
||||
const b = cfg.blocks.find((bl) => bl.text.includes(sub));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue