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") =
|
||||
buildBinary name, srcDir, "--mm:arc -d:release"
|
||||
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":
|
||||
let examples = @["fuzz_graph"]
|
||||
|
@ -36,7 +36,7 @@ task testDrChaosExamples, "Build & run Dr. Chaos examples":
|
|||
task testDrChaos, "Build & run Dr. Chaos tests":
|
||||
for filePath in listFiles("tests/"):
|
||||
if filePath[^4..^1] == ".nim":
|
||||
test filePath[len("tests/")..^5], args = " -error_exitcode=0"
|
||||
test filePath[len("tests/")..^5], args = "-error_exitcode=0"
|
||||
|
||||
task testDrChaosNoCrash, "Build & run Dr. Chaos tests that should not crash":
|
||||
for filePath in listFiles("tests/no_crash/"):
|
||||
|
|
|
@ -63,7 +63,7 @@ proc mutateEnum*(index, itemCount: int; r: var Rand): int =
|
|||
if itemCount <= 1: 0
|
||||
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).
|
||||
runMutator(result, sizeIncreaseHint, false, r)
|
||||
|
||||
|
|
Loading…
Reference in New Issue