This commit is contained in:
Antonis Geralis 2022-08-30 10:02:09 +03:00
parent 02ff85c772
commit 7b5ff30704
2 changed files with 4 additions and 3 deletions

View File

@ -24,8 +24,9 @@ defining a fixed-size type and ensuring the software under test doesn't crash li
import drchaos
proc fuzzMe(s: string, a, b, c: int32) =
if a == 0xd0d0caca'i32 and b == 0x11111111'i32 and c == 0x22222222'i32:
if s.len == 100: quit(1)
# function under test
if a == 0xdeadc0de'i32 and b == 0x11111111'i32 and c == 0x22222222'i32:
if s.len == 100: doAssert false
func fuzzTarget(data: (string, int32, int32, int32)) =
let (s, a, b, c) = data

View File

@ -1,7 +1,7 @@
import drchaos
proc fuzzMe(s: string, a, b, c: int32) =
if a == 0xdeadbeef'i32 and b == 0x11111111'i32 and c == 0x22222222'i32:
if a == 0xdeadc0de'i32 and b == 0x11111111'i32 and c == 0x22222222'i32:
if s.len == 100: doAssert false
func fuzzTarget(data: (string, int32, int32, int32)) =