From d337435aa145a8b57b5625826e94ecb40569a4ec Mon Sep 17 00:00:00 2001 From: kdeme Date: Thu, 26 Sep 2019 18:27:23 +0200 Subject: [PATCH] Add simple rlp fuzz test --- tests/fuzzing/rlp/fuzz.nim | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/fuzzing/rlp/fuzz.nim diff --git a/tests/fuzzing/rlp/fuzz.nim b/tests/fuzzing/rlp/fuzz.nim new file mode 100644 index 0000000..861dcf3 --- /dev/null +++ b/tests/fuzzing/rlp/fuzz.nim @@ -0,0 +1,12 @@ +import chronicles, eth/rlp, ../fuzz_helpers + +# TODO: have a default init as such +init: + discard + +test: + try: + var rlp = rlpFromBytes(payload.toRange) + discard rlp.inspect() + except RlpError: + debug "Inspect failed", err = getCurrentExceptionMsg()