(in-package :it.bese.FiveAM)
-;;;; * Random (QuickCheck-ish) testing
+;;;; ** Random (QuickCheck-ish) testing
;;;; FiveAM provides the ability to automatically generate a
;;;; collection of random input data for a specific test and run a
(defclass for-all-test-never-run (test-failure for-all-test-result)
())
-;;;; ** Generators.
+;;;; *** Generators
;;;; Since this is random testing we need some way of creating random
;;;; data to feed to our code. Generators are regular functions whcih
(lambda () ,@body)))
(defgenerator gen-integer (&key (max (1+ most-positive-fixnum))
- (min (1+ most-negative-fixnum)))
+ (min (1- most-negative-fixnum)))
(+ min (random (1+ (- max min)))))
(defgenerator gen-character (&key (code (gen-integer :min 0 :max (1- char-code-limit)))