This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-02-25
Channels
- # beginners (20)
- # boot (25)
- # cider (1)
- # cljs-dev (7)
- # cljsjs (1)
- # cljsrn (1)
- # clojure (79)
- # clojure-austin (2)
- # clojure-berlin (13)
- # clojure-dusseldorf (1)
- # clojure-germany (7)
- # clojure-russia (10)
- # clojure-serbia (1)
- # clojure-spec (18)
- # clojure-uk (4)
- # clojured (1)
- # clojurescript (90)
- # cursive (10)
- # datomic (7)
- # emacs (14)
- # hoplon (6)
- # luminus (16)
- # lumo (4)
- # numerical-computing (2)
- # om (25)
- # om-next (1)
- # onyx (11)
- # pedestal (10)
- # protorepl (1)
- # reagent (11)
- # remote-jobs (1)
- # ring (1)
- # rum (38)
- # spacemacs (5)
- # test-check (7)
- # untangled (122)
- # vim (1)
- # yada (8)
hey all, newbie test.check question. how would I go about creating a generator for something like java date objects? I’ve found obv clojure.data.generators/date, which produces random date objects. I’m missing how to utilize that fn to produce a generator I could use in e.g. specs
I can use return
but from what I can tell from the documentation, the value returned by the call should always be the same, as opposed to something randomized
@mss you can't use things in clojure.data.generators for test.check
a super easy option is (gen/fmap #(java.util.Date. %) gen/large-integer)
if you don't care about the distribution at all that will suffice