Hi. I need to generate some data based on a normal distribution. How can I do that with test.check?
@pablore you want to ignore the size
parameter, I imagine?
any desired shrinking behavior?
I dont understand what you mean
size
controls how generated values start simple and get more complex as you run more trials
more details here: https://github.com/clojure/test.check/blob/master/doc/growth-and-shrinking.md
Ok this is more complex than I thought xd. I'll give it a read, thanks!
if you don't care all that much, I'd say the easiest thing is to use gen/choose
with 0
and Integer/MAX_VALUE
and the gen/fmap
with some function that converts a uniform distribution to a normal one
might help to divide by Integer/MAX_VALUE
first I guess
to get it between 0 and 1
thanks
(the fact that my initial questions don't have obvious answers is part of why this isn't built-in)
Hi!
I'm trying to integrate test.chuck's checking
into a cljs.test project.
The readme points to a blog post where there is an example showing the full report on errors (vs. just one wrong result)
Was that ever integrated into the official checking macro? I can't seem to make it work here.
(The full report is terribly useful for fixing things that went wrong!)
what do you mean by "full report"? I.e., what information is there? (I'm fuzzy on all this)
Great, thanks for the guidance!
Oh, sorry for the delay! Here's the linked page - on the section "Including Results" you can see an example: http://blog.colinwilliams.name/clojure/testing/2015/01/26/alternative-clojure-dot-test-integration-with-test-dot-check.html I'm only getting the second kind of output, instead of both (or just the first)
maybe this commit removed it by accident? https://github.com/gfredericks/test.chuck/commit/b45fb4db83f66
it's probably easy to interpret the output as accidentally oververbose
looking more closely, it's possible that the addition of the not-falsey-or-exception?
call meant that the output originally intended wasn't happening at that point, so it really did look redundant
I think a PR that adds it back in would be okay, but a PR that adds custom reporting so that there's only one FAIL
line printed instead of two would be even better, probably