This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-08
Channels
- # adventofcode (31)
- # beginners (97)
- # bigdata (2)
- # boot (276)
- # cider (17)
- # cljsrn (5)
- # clojure (150)
- # clojure-china (3)
- # clojure-conj (8)
- # clojure-greece (1)
- # clojure-india (1)
- # clojure-korea (1)
- # clojure-new-zealand (4)
- # clojure-russia (40)
- # clojure-spec (119)
- # clojure-uk (116)
- # clojurescript (87)
- # code-reviews (110)
- # core-async (4)
- # cursive (11)
- # datomic (26)
- # garden (4)
- # gorilla (7)
- # hoplon (82)
- # humor (1)
- # jobs (2)
- # jobs-discuss (10)
- # luminus (17)
- # onyx (60)
- # planck (2)
- # play-clj (2)
- # protorepl (70)
- # re-frame (121)
- # reagent (7)
- # ring-swagger (3)
- # rum (16)
- # test-check (16)
- # untangled (12)
- # yada (20)
theoretically yes, there's just not an easy function included that does this
I've written it once or twice, it's only a few lines; I probably don't have one handy though
your request can be interpreted a couple of different ways though
default shrinks are going to be less interesting; e.g., if your generator is (gen/vector gen-some-big-hairy-data-structure)
, then the easiest way of shrinking it consists of taking one step to []
Maybe a version of sample that returns small
, medium
, big
, medium
, small
, so that it’s easy to see how a value grows then shrinks?
that might be weirder than it sounds
I should probably get a much better understanding of test.check’s shrinking before bugging you furthur
it's tempting to think that the growing you see in sample
and in a test run is related to the shrinking you get in a failure, but they're almost entirely unrelated processes
I don't mind discussing it, the whole thing is currently underdocumented so I deserve to have to explain things live :)
another thing you could implement without too much trouble is a random shrink
it might not resemble too closely what would happen in a real test, but it could at least give you an idea of what sorts of steps are possible
@nwjsmith this part of this talk introduces the idea of a shrink tree, which is most of what you need to know to understand the shrinking mechanics: https://youtu.be/u0t-6lUvXHo?t=11m6s
I suppose it's a rather steep introduction, but it's at least better than me typing stuff