Example took me a while to grok
Closed this issue · 1 comments
dickmao commented
Please consider the following for the README.
(defun my-zerop (num)
(= num 0))
(propcheck-deftest my-zerop-should-match-zerop ()
(let* ((i (propcheck-generate-integer "i")))
;; let propcheck run through all manner of integers
;; to ensure my-zerop matches standard zerop
(propcheck-should (equal (zerop i) (my-zerop i)))))
For someone who's never heard of Quickcheck or "property-based testing", I think the above conveys the gist. I had to google "property-based testing" even after staring at the "buggy-zerop" example.