MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / constructor

Method constructor

packages/testkit/src/fuzz.ts:46–65  ·  view source on GitHub ↗
(
    ctx: Pick<FuzzIterationContext, "label" | "seed" | "iteration" | "caseSeed">,
    cause: unknown,
    notes: readonly string[],
  )

Source from the content-addressed store, hash-verified

44 readonly notes: readonly string[];
45
46 constructor(
47 ctx: Pick<FuzzIterationContext, "label" | "seed" | "iteration" | "caseSeed">,
48 cause: unknown,
49 notes: readonly string[],
50 ) {
51 const detail = describeThrown(cause);
52 const noteText = notes.length === 0 ? "" : ` notes=[${notes.join("; ")}]`;
53 super(
54 `fuzz failed: ${ctx.label} seed=${hexSeed(ctx.seed)} iteration=${String(
55 ctx.iteration,
56 )} caseSeed=${hexSeed(ctx.caseSeed)}: ${detail}${noteText}`,
57 { cause },
58 );
59 this.name = "FuzzFailureError";
60 this.label = ctx.label;
61 this.seed = ctx.seed;
62 this.iteration = ctx.iteration;
63 this.caseSeed = ctx.caseSeed;
64 this.notes = Object.freeze([...notes]);
65 }
66}
67
68export function hexSeed(seed: number): string {

Callers

nothing calls this directly

Calls 2

describeThrownFunction · 0.70
hexSeedFunction · 0.70

Tested by

no test coverage detected