cl-quickcheck icon indicating copy to clipboard operation
cl-quickcheck copied to clipboard

couple of problems

Open rebcabin opened this issue 8 years ago • 2 comments

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.

rebcabin avatar Feb 07 '16 03:02 rebcabin

If something might break, add more tests.

As long as the coverage is high, it's okay to refactor!

mcandre avatar Feb 07 '16 04:02 mcandre

Ok, great. Let me see what I can do.

rebcabin avatar Feb 07 '16 18:02 rebcabin