minor
This commit is contained in:
parent
6992d6819c
commit
a4cbf3e6c6
|
@ -26,7 +26,7 @@ proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
|
||||||
proc test(name: string, srcDir = "tests/", args = "", lang = "c") =
|
proc test(name: string, srcDir = "tests/", args = "", lang = "c") =
|
||||||
buildBinary name, srcDir, "--mm:arc -d:release"
|
buildBinary name, srcDir, "--mm:arc -d:release"
|
||||||
withDir("build/"):
|
withDir("build/"):
|
||||||
exec "./" & name & " -max_total_time=3 -runs=10000" & args
|
exec "./" & name & " -max_total_time=1 -runs=10000 " & args
|
||||||
|
|
||||||
task testDrChaosExamples, "Build & run Dr. Chaos examples":
|
task testDrChaosExamples, "Build & run Dr. Chaos examples":
|
||||||
let examples = @["fuzz_graph"]
|
let examples = @["fuzz_graph"]
|
||||||
|
|
|
@ -63,7 +63,7 @@ proc mutateEnum*(index, itemCount: int; r: var Rand): int =
|
||||||
if itemCount <= 1: 0
|
if itemCount <= 1: 0
|
||||||
else: (index + 1 + r.rand(itemCount - 1)) mod itemCount
|
else: (index + 1 + r.rand(itemCount - 1)) mod itemCount
|
||||||
|
|
||||||
proc newInput*[T](sizeIncreaseHint: int; r: var Rand): T =
|
proc newInput*[T](sizeIncreaseHint: Natural; r: var Rand): T =
|
||||||
## Creates new input with a chance of returning default(T).
|
## Creates new input with a chance of returning default(T).
|
||||||
runMutator(result, sizeIncreaseHint, false, r)
|
runMutator(result, sizeIncreaseHint, false, r)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue