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 #81

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

lihaohong6
Copy link

Randomized testing seems to be planned in #63 but was never actually done. This is an attempt at it using the rapidcheck library.

3 crashes have been found so far. They are documented by FIXMEs. They all happen when malformed inputs are supplied to the library. For example, find_end segfaults if the first list is shorter than the second list due to a bad index access, though it is supposed to return list1.end().

Most functions tested by test_primitives.cpp have been covered. More tests (and some documentation on running these tests) are forthcoming.

@lihaohong6
Copy link
Author

@DanielLiamAnderson Any thoughts on this PR? I'll keep working on polishing the code/documentation if you think this patch can potentially be merged.

@DanielLiamAnderson
Copy link
Contributor

I'm not familiar with the RapidCheck library but this seems useful for sure.

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.

2 participants