Is there a way to see some sample values for a hedgehog test that passes? I can't shake the feeling that my tests are passing because they test nothing
@Fintan Halpenny thanks. i was hoping for something like MonadIO m => Property -> m () instead, the properties are kind of a pain to deconstruct and thread the sample into
Is there a way to see some sample values for a hedgehog test that passes? I can't shake the feeling that my tests are passing because they test nothing
There's a
sample
function I thinkhttps://hackage.haskell.org/package/hedgehog-1.0.2/docs/Hedgehog-Gen.html#v:sample
@Fintan Halpenny thanks. i was hoping for something like
MonadIO m => Property -> m ()
instead, the properties are kind of a pain to deconstruct and thread thesample
intocould you just stick
H.failure
at the end of yourProperty
and see what generated value it reports?Hedgehog (like QC) has combinators to collect custom statistics about your test cases https://hackage.haskell.org/package/hedgehog-1.0.2/docs/Hedgehog.html#g:4
@Asad Saeeduddin I wonder whether you could also use https://hackage.haskell.org/package/hedgehog-1.0.2/docs/Hedgehog.html#v:withConfidence to make sure you're testing what you think you're testing?
@Matt Peddie That's interesting. What should I be passing for
Confidence
?the
Confidence
type is given a few lines abovewithConfidence