This just seemed like such an obvious thing to write property based tests for, so I tried it out and it found some issues.
Did I understand it correctly that it should be able to encode and then decode any sequence of bytes and end up with the original input? The regression I committed (just run cargo test to reproduce) found that decode(encode(vec![0u8, 223u8, 124u8])) returns None.
This just seemed like such an obvious thing to write property based tests for, so I tried it out and it found some issues. Did I understand it correctly that it should be able to encode and then decode any sequence of bytes and end up with the original input? The regression I committed (just run
cargo test
to reproduce) found thatdecode(encode(vec![0u8, 223u8, 124u8]))
returnsNone
.