-
Notifications
You must be signed in to change notification settings - Fork 97
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
Check invariants for all operations #449
Comments
What does this look like in practice? Do you have a link? |
It varies somewhat by module, and I don't know that the design is wonderful. Would it be so bad to just add |
I don't know whether it would be so bad, but my preference is to have separate validation tests. I think that would make it easier to see whether such a test exists for a given function or not. In |
My concern with separate tests is performance. I'd much rather have enough time to run, say, 20×(property+validation) tests than 15×property+15×validation, or whatever it comes out to. Generation isn't free, and neither are intersections, unions, etc. I agree that the way it's handled in |
Where are these performance concerns coming from? Currently, the entire test suite takes about 1s to run for me. 1.6s with |
Wow ... that's ... surprising. To my mind, such fast runs means our examples are too small or there aren't enough of them. |
Maybe. In my experience test suites of Haskell packages often are quite speedy. The |
I haven't looked at the test suite recently. Are we getting coverage of enough tree shapes and heights, ignoring the |
That was the goal with #442. I'm fairly confident about the test generators. But feel free to investigate. |
We now check invariants for intersections. We should do it for everything else too.
containers
generally integrates validity tests into other correctness tests (i.e., is the result valid and does it satisfy the other expected properties). That wouldn't be a bad approach to emulate.The text was updated successfully, but these errors were encountered: