Re:The unreasonable effectiveness of print debugging
by corty on Saturday April 24, 2021 @02:18PM
(#26927098)
Haskell debugging by testing is great for small functions where you can use quickcheck. But larger tests for the more complicated stuff don't work in quickcheck and there isn't much else that one can easily do.
[ Parent
| on HN ]
Re:The unreasonable effectiveness of print debugging
by Quekid5 on Saturday April 24, 2021 @03:36PM
(#26927672)
Not sure what you mean, there's e.g. Tasty for non-QC testing. It can do all sorts of variations of test, e.g. traditional unit tests, "golden" tests, etc.
Re:The unreasonable effectiveness of print debugging
by slaymaker1907 on Saturday April 24, 2021 @03:34PM
(#26927659)
I haven't actually used quickcheck in Haskell, but I've used it for very complicated tests in other languages including Racket, TypeScript, Rust, and Java. The nicest thing about quickcheck is that it lets you easily create test data without imposing too many constraints on it. Regular fuzzing or randomized testing is almost as good, but the narrowing done by quickcheck is sometimes nice for understanding test failures.