gfredericks / test.chuck

A utility library for test.check
Eclipse Public License 1.0
214 stars 26 forks source link

Adds options to 'checking' #49

Closed bhb closed 7 years ago

bhb commented 7 years ago

Fixes https://github.com/gfredericks/test.chuck/issues/48

The :reporter-fn option to quick-check is not available on test.check 0.9.0, so there is no tests for it, but it should work without further modification.

To maintain backwards compatibility, I have (optionally) replaced the number of tests with a map containing all options e.g.

(checking "less than 10" {:num-tests 11 :seed 123} [i gen/int]
  (is (< i 10)))

This form mirrors the way you can optionally use defspec:

(defspec less-than-10 {:num-tests 11 :seed 123}
  (prop/for-all [i gen/int]
        (< i 10)))
gfredericks commented 7 years ago

This looks pretty good, thanks; I'll merge it once the renaming change is done

bhb commented 7 years ago

@gfredericks Thanks for taking a look. I've renamed some stuff, but if you don't like all the changes, I can revert.

bhb commented 7 years ago

@gfredericks Is there anything else you'd like me to change?

gfredericks commented 7 years ago

Released with 0.2.7, thanks again!