containers-backpack
containers-backpack copied to clipboard
Discuss separation on unit tests and property-based tests
Some tests introduced in #34 are unit tests and some are property-based tests. It would be really nice to somehow separate tests. For example, this one is unit test:
https://github.com/kowainik/containers-backpack/blob/c84b22f7551bd34183ac76ff20dd4e4fa4cd6f48/containers-contrib-readonly/src/Map/Contrib/Laws.hs#L21-L22
But this looks like property-based test:
https://github.com/kowainik/containers-backpack/blob/c84b22f7551bd34183ac76ff20dd4e4fa4cd6f48/containers-contrib-readonly/src/Map/Contrib/Laws.hs#L65-L72
I would love to have 3 test-suites:
- test-suite for unit tests
- test-suite for property tests
- One test suite that combines them all.
My proposal is to use hspec for unit tests. QuickCheck can be used now for property-based tests.