Has anyone had experience adding 'famous' examples to their test.check runs?
I think it would be valuable for regression testing, but I suppose that's what clojure.test is for.
I think the same thing that would let you do that, also makes it easier to run you test over and over again with a given set of inputs if you do hit a failure, which is useful when you do find a failure
the way to do that, I think, is to have your, uh, assertions, as separate functions
which you can call from properties or other tests
That would work
I'm experimenting with using spec/test.check to do TDD. It's proving more challenging than I thought it would be. Often it's easier to come up with an example than a property/invariant.
writing properties takes practice
"I don't know what properties to write" is a common problem people run into at first
the only hard parts of property testing are the generators and the properties
;)
I better get practicing then 🙂 Hopefully in a few years, there will be much more guidance on how to do property-based testing. There's so much out there on example-based now.