mirror of
https://github.com/status-im/nim-drchaos.git
synced 2025-02-19 22:28:15 +00:00
12 lines
272 B
Nim
12 lines
272 B
Nim
# Make sure we catch the exception and it doesn't leak any memory.
|
|
# Should print a stack trace in debug mode.
|
|
import drchaos
|
|
|
|
proc testMe(x: int) =
|
|
raise newException(ValueError, "Fuzzer test1: " & $x)
|
|
|
|
func fuzzTarget(x: int) =
|
|
testMe(x)
|
|
|
|
defaultMutator(fuzzTarget)
|