-
Notifications
You must be signed in to change notification settings - Fork 139
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
Split generic tests into separate package #459
Comments
There are https://hackage.haskell.org/package/quickcheck-classes-0.6.5.0/docs/Test-QuickCheck-Classes.html#v:muvectorLaws, it should be easy to make them more polymorphic to cover Cf. https://github.com/Bodigrim/rotcev/blob/master/test/Main.hs |
The idea with
I would suggest to create a public sublibrary with reusable tests directly in Either way, I do see it as a good idea to to expose all the test functionality that could be useful to the outside world and making it reusable through a library, be it standalone or sublibrary. |
One benefit of vector's test suite is that it's rather comprehensive. So one could hope that does exercise all relevant properties. It's also more likely to be correct. For example I like idea of using public sublibrary. It however may break some of existing tooling. Quick search brings up: NixOS/cabal2nix#448 NixOS/cabal2nix#539 |
Good. Maybe adding a sublibrary to vector will speed up fixes in those tools. Thus further promoting support for new and useful features 😄 |
I'd suggest starting with an internal sublibrary first, publishing it and checking how infrastructure copes. Even Stack has (had?) issues with internal sublibraries (see commercialhaskell/stackage#6167) and I suspect that public sublibraries will be an even bigger challenge (see commercialhaskell/stack#5318). |
We have an impressive battery of tests which are generic in vector type. I propose splitting them into separate package to benefit anyone who defines instances for vector type classes (me). It turns out creating nontrivial instance is error prone. I was writing storable vectors with stride (vector elements are every n-th in buffer)
This will entail creating another package
vector-test
which exposes generic tests and moving vector's test suite there. @lehins @Bodigrim what's you opinion on that?The text was updated successfully, but these errors were encountered: