minor
This commit is contained in:
parent
0135c8eae3
commit
cda7648d2e
|
@ -63,11 +63,11 @@ when defined(runFuzzTests) and isMainModule:
|
||||||
proc mutate(value: var seq[NodeIdx]; sizeIncreaseHint: int; enforceChanges: bool; r: var Rand) =
|
proc mutate(value: var seq[NodeIdx]; sizeIncreaseHint: int; enforceChanges: bool; r: var Rand) =
|
||||||
repeatMutateInplace(mutateSeq(value, tmp, MaxEdges, sizeIncreaseHint, r))
|
repeatMutateInplace(mutateSeq(value, tmp, MaxEdges, sizeIncreaseHint, r))
|
||||||
|
|
||||||
proc postProcess[T: SomeNumber](x: var seq[Node[T]]; r: var Rand) =
|
proc postProcess[T](x: var seq[Node[T]]; r: var Rand) =
|
||||||
for n in x.mitems:
|
for n in x.mitems:
|
||||||
for i in countdown(n.edges.high, 0):
|
for i in countdown(n.edges.high, 0):
|
||||||
if n.edges[i].int >= x.len:
|
if n.edges[i].int >= x.len:
|
||||||
delete(n.edges, i)
|
del(n.edges, i)
|
||||||
|
|
||||||
func fuzzTarget(x: Graph[int8]) =
|
func fuzzTarget(x: Graph[int8]) =
|
||||||
when defined(dumpFuzzInput): debugEcho(x)
|
when defined(dumpFuzzInput): debugEcho(x)
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
--define: runFuzzTests
|
--define: runFuzzTests
|
||||||
|
# --define: dumpFuzzInput
|
||||||
|
|
Loading…
Reference in New Issue