Fork me on GitHub
#test-check
<
2016-10-24
>
nwjsmith14:10:40

Has anyone had experience adding 'famous' examples to their test.check runs?

nwjsmith14:10:03

I think it would be valuable for regression testing, but I suppose that's what clojure.test is for.

hiredman15:10:38

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

hiredman15:10:21

the way to do that, I think, is to have your, uh, assertions, as separate functions

hiredman15:10:41

which you can call from properties or other tests

nwjsmith15:10:25

That would work

nwjsmith15:10:02

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.

gfredericks18:10:34

writing properties takes practice

gfredericks18:10:52

"I don't know what properties to write" is a common problem people run into at first

Alex Miller (Clojure team)18:10:27

the only hard parts of property testing are the generators and the properties

nwjsmith18:10:52

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.