gfredericks / test.chuck

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

`checking` should avoid value-or-exception logic #68

Open frenchy64 opened 3 years ago

frenchy64 commented 3 years ago

Suggested: https://github.com/gfredericks/test.chuck/issues/67#issuecomment-822020278

test.check has boolean values to check if a testing run has succeeded. checking uses the more crude (legacy?) check of whether the return is an exception.

frenchy64 commented 2 years ago

It seems like value-or-exception logic is baked into the internals of test.check for spec compatibility. I can't see a use case where using :pass? or :result-data instead of :result would change any reporting.

https://github.com/clojure/test.check/blob/c05034f911fa140913958b79aa51017d3f2f4426/src/main/clojure/clojure/test/check/properties.cljc#L32-L37