cl-quickcheck
cl-quickcheck copied to clipboard
couple of problems
Not sure how to fix these, but consider the following (under SBCL 1.3.1)
(let ((*print-length* 14))
(quickcheck
(when *testing*
(for-all ((s (lambda () (funcall an-integer))))
(is= s s))
(for-all ((s (lambda () (funcall a-boolean))))
(isnt= s (not s)))
(for-all ((s #'a-string))
(is= s s)))
))
I could not get something like ((s #'an-integer))
to work, because define
, the scheme-like, didn't actually make a function, that is, instead of
(cond ((symbolp binding)
`(defparameter ,binding (lambda () ,@body)))
...
it has
(cond ((symbolp binding)
`(defparameter ,binding ,@body))
...
I didn't want to submit a pull request on this without consulting you because it might break a bunch of other stuff.
I'll submit the other problem in a different issue.
If something might break, add more tests.
As long as the coverage is high, it's okay to refactor!
Ok, great. Let me see what I can do.