@nberger I'm curious if there's a cleaner way to implement statistics using this: https://github.com/clojure/test.check/commit/4450152532eeaace449ca9241673428a19448eba
@gfredericks I think so. I'll play with it in the next few days. I already started rebasing the stats branch to the current master, playing with this will be my next task
but not "as is": we need a way to carry the labels over the quick check loop, but result is not passed over on passing trials (neither to the recur or to the reporter-fn :trial
). I'm looking at https://github.com/clojure/test.check/blob/4450152532eeaace449ca9241673428a19448eba/src/main/clojure/clojure/test/check.cljc#L101-L105
We especially need to pass it in some way in that recur call. But passing result
doesn't make much sense to me
right
it might not make any sense
just struck me as a somewhat overlapping bit of functionality
yeah
@gfredericks have you thought of turning the quickcheck loop into a reduce, where some "bigger" state is carried over, including the rng-state, the labels, test count... well all the state that is passed over in the recur but in a way that it would be easier to add stuff like the stats labels?
I've been thinking around that idea for some time, but never got to play with it. At first sight seems like it should work.
I think haskell's quickcheck works that way, I'm looking at https://github.com/nick8325/quickcheck/blob/master/Test/QuickCheck/Property.hs#L370. Even though my haskell fu is very limited, and that the function is called mapTotalResult
, I think it's a reduce 🙂
For anyone wondering what statistics are we talking about, it's on http://dev.clojure.org/jira/browse/TCHECK-87
I was monkeying with the quickcheck loop when I was trying to do parallel tests
which changes the linearity of the reduce
but I think it is a reduce, yeah