Welcome! Please see the About page for a little more info on how this works.

0 votes
in test.check by

I've got a macro that integrates with clojure.test at a different level than defspec, which I've found useful in migrating tests from non-generative to generative:

`
(deftest something-important
(checking "something really important" [x gen/int]

(is (= (important-calculation x) (inc x)))))

`

I've found it natural to reach the above from something like this:

`
(deftest something-important
(testing "something really important"

(is (= (important-calculation 1) 2))))

`

There are still a lot of rough edges, but I wanted to get peoples reactions before I started polishing it for a patch.

2 Answers

0 votes
by

Comment made by: reiddraper

Thanks for the comment Colin. At the moment, I'd like to keep the integration simple (meaning there is one way to do things), and keep 'alternative syntax' macros and functions out of test.check itself. (link: https://github.com/gfredericks/test.chuck text: Gary's test.chuck) might be a good home for this.

0 votes
by
Reference: https://clojure.atlassian.net/browse/TCHECK-58 (reported by alex+import)
...