Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add property based testing #1

Merged
merged 1 commit into from Jul 16, 2023
Merged

Add property based testing #1

merged 1 commit into from Jul 16, 2023

Conversation

bondo
Copy link
Contributor

@bondo bondo commented Jul 16, 2023

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
Copy link
Owner

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.

@MinisculeGirraffe MinisculeGirraffe merged commit 85aa2b8 into MinisculeGirraffe:main Jul 16, 2023
@bondo bondo deleted the ft-property-based-testing branch July 16, 2023 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants