From f9ce18a5bed599b17ccc0dcff953a23757c6c1aa Mon Sep 17 00:00:00 2001 From: Antonis Geralis Date: Wed, 7 Sep 2022 15:44:53 +0300 Subject: [PATCH] rm example, mutate string overload doesn't work and there is a better way --- examples/fuzz_strtabs.nim | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 examples/fuzz_strtabs.nim diff --git a/examples/fuzz_strtabs.nim b/examples/fuzz_strtabs.nim deleted file mode 100644 index b2ebba8..0000000 --- a/examples/fuzz_strtabs.nim +++ /dev/null @@ -1,21 +0,0 @@ -import drchaos/mutator, std/[strtabs, random] - -proc mutate(data: var StringTableRef; sizeIncreaseHint: int; enforceChanges: bool; r: var Rand) = - var value: seq[tuple[key, value: string]] - for p in pairs(data): - value.add p - repeatMutateInplace(mutateSeq(value, tmp, 2, sizeIncreaseHint, r)) - clear(data) - for key, val in value.items: - data[key] = val - -proc mutate(value: var string; sizeIncreaseHint: int; enforceChanges: bool; r: var Rand) = - repeatMutate(mutateUtf8String(move value, 4, sizeIncreaseHint, r)) - -proc default(_: typedesc[StringTableRef]): StringTableRef = - newStringTable(modeCaseSensitive) - -func fuzzTarget(x: StringTableRef) = - doAssert x != {"key1": "val1", "key2": "val2"}.newStringTable - -defaultMutator(fuzzTarget)