purescript-contrib / purescript-quickcheck-laws

QuickCheck powered law tests for PureScript's core typeclasses.
MIT License
25 stars 18 forks source link

Alternative functions for better error reporting #45

Open athanclark opened 5 years ago

athanclark commented 5 years ago

QuickCheck comes shipped with a Result type and some comparison functions like (===) and (<?), to make reporting the failed test case as natural as using Boolean, while relying on an additional Show predicate on the data type. Using these, and some additional functions from purescript-quickcheck-combinators, new implementations for each test suite have been defined, with a *Show suffix (i.e. checkEqShow :: ... Eq a => Show a => ...), and rely on Result as the Testable instance to run in quickCheck'.

It's a pretty simple set of additional functions, I'm surprised they didn't exist before. Please let me know if you need anything to get this PR approved! Thank you!