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

Test count is off?

Open rebcabin opened this issue 8 years ago • 0 comments

Consider the following (under SBCL 1.3.1)

(load "~/quicklisp/setup.lisp")
(ql:quickload :cl-quickcheck)
(shadow 'cl-quickcheck:report '#:cl-user)
(use-package :cl-quickcheck)
(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)))
    ))

This reports two tests, not three.

To load "cl-quickcheck":
  Load 1 ASDF system:
    cl-quickcheck
; Loading "cl-quickcheck"

Starting tests with seed #S(RANDOM-STATE :STATE #.(MAKE-ARRAY 627 :ELEMENT-TYPE
                                                              '(UNSIGNED-BYTE
                                                                32)
                                                              :INITIAL-CONTENTS
                                                              '(0 2567483615
                                                                624 5489
                                                                1301868182
                                                                2938499221
                                                                2950281878
                                                                1875628136
                                                                751856242
                                                                944701696
                                                                2243192071
                                                                694061057
                                                                219885934
                                                                2066767472 ...)))
............................................................................................................................................................................................................................................................................................................
2 tests submitted; all passed.

Commenting out various combinations of the for-alls either leaves the count at 2 or reduces it to 1, but I haven't been able to get it to 3.

rebcabin avatar Feb 07 '16 03:02 rebcabin