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

Introduce property based tests for more rigor, plus some examples of failing combinations #1

Merged
merged 1 commit into from Jan 4, 2019

Conversation

Projects
None yet
2 participants
@ZackPierce
Copy link
Contributor

ZackPierce commented Jan 4, 2019

This PR is intended to broaden the tested input for this library through the use of property based testing.

So far these test runs have exposed some failing input combinations, a few of which I've included as short term spot-unit-tests for regression comparison.

There's a bit more code replication than I would prefer in the correctness assertion logic, but I haven't had time to introduce sufficient macro or private-trait effort to DRY things up fully. Hopefully it's tolerable for the time being as correctness is improved.

@ejmahler

This comment has been minimized.

Copy link
Owner

ejmahler commented Jan 4, 2019

I'm surprised to see there are some failing cases. Thanks for setting this up!

I'll keep prop testing in for u32 and u64, but the space is small enough for u16 and especially for u8 that we might as well have an exhaustive test.

@ejmahler ejmahler merged commit e6bd607 into ejmahler:master Jan 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment