test-check

2016-11-15T12:28:12.000147Z

@nberger I'm curious if there's a cleaner way to implement statistics using this: https://github.com/clojure/test.check/commit/4450152532eeaace449ca9241673428a19448eba

nberger 2016-11-15T12:33:54.000148Z

@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

nberger 2016-11-15T12:42:53.000149Z

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

nberger 2016-11-15T12:46:04.000151Z

We especially need to pass it in some way in that recur call. But passing result doesn't make much sense to me

2016-11-15T12:47:58.000152Z

right

2016-11-15T12:48:22.000153Z

it might not make any sense

2016-11-15T12:48:28.000154Z

just struck me as a somewhat overlapping bit of functionality

nberger 2016-11-15T12:48:51.000155Z

yeah

nberger 2016-11-15T12:59:43.000156Z

@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?

nberger 2016-11-15T13:05:23.000157Z

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 🙂

nberger 2016-11-15T13:07:14.000159Z

For anyone wondering what statistics are we talking about, it's on http://dev.clojure.org/jira/browse/TCHECK-87

2016-11-15T13:08:07.000160Z

I was monkeying with the quickcheck loop when I was trying to do parallel tests

2016-11-15T13:08:20.000161Z

which changes the linearity of the reduce

2016-11-15T13:08:29.000162Z

but I think it is a reduce, yeah

👍 1