meiersi / blaze-binary

A draft of a new binary serialization library based on the new bytestring-builder and attoparsec.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test resistance of decoder to random changes

meiersi opened this issue · comments

As described in the README, a Decoder should never throw an exception. All errors should be reported via a Left message. We can test this by randomly exchanging a few (just one?) bytes of a correctly encoded input, truncating it, or decoding with the wrong type. It may however be very well the case that a decode nevertheless succeeds.