nimLeaveFinally is added automatically
This commit is contained in:
Antonis Geralis 2022-08-26 21:51:27 +03:00
parent 7893007212
commit cc6c04b9e6
2 changed files with 4 additions and 3 deletions

View File

@ -24,7 +24,7 @@ proc buildBinary(name: string, srcDir = "./", params = "", lang = "c") =
exec "nim " & lang & " --out:build/" & name & " " & extra_params & " " & srcDir & name & ".nim"
proc test(name: string, srcDir = "tests/", args = "", lang = "c") =
buildBinary name, srcDir, "--mm:arc -d:danger"
buildBinary name, srcDir, "-d:release"
# Should ideally run inside build/ because of the artifacts, but cd doesn't work!
exec "build/" & name & " -max_total_time=3 -runs=10000" & args

View File

@ -515,8 +515,9 @@ template mutatorImpl(target, mutator, typ: untyped) =
try:
FuzzTarget(target)(getInput(x, data))
finally:
# Call Nim's compiler api to report unhandled exceptions.
{.emit: "nimTestErrorFlag();".}
when compileOption("exceptions", "goto"):
# Call Nim's compiler api to report unhandled exceptions.
{.emit: "nimTestErrorFlag();".}
proc customMutatorImpl(x: var typ; data: openArray[byte]; maxLen: int;
r: var Rand): int {.nosan.} =