MinisculeGirraffe / mojibake

Encode/Decode bytes as emoji base2048
https://crates.io/crates/mojibake
MIT License
15 stars 1 forks source link

Add property based testing #1

Closed bondo closed 1 year ago

bondo commented 1 year ago

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.

MinisculeGirraffe commented 1 year ago

Yeah you're understanding it right. Thanks for adding them!

I'll open an issue for the failure. and see if I can figure out where I goofed.