Skip to content
Fuzz Testing in Common Lisp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
COPYING
README
README.md
cl-fuzz.asd
example.lisp
fuzz.lisp

README.md

CL-FUZZ

A simple fuzz-testing package for Common Lisp

API documentation: http://ndantam.github.com/cl-fuzz

Usage

  • Load CL-FUZZ via asdf
  • Define a function to generate random data, aka the fuzz
  • Define a function to perform some tests on the fuzz
  • Pass these functions to FUZZ:PERFORM-TESTS
  • For more details, see http://ndantam.github.com/cl-fuzz and the included example.lisp file

Example

A trivial example to test #'EVENP and #'ODDP:

(fuzz:run-tests (lambda () (* 2 (random 1000)))                   ; generator
                (lambda (fuzz)                                    ; tester
                  (fuzz:test-true 'even (lambda () (evenp fuzz))) ; test 1
                  (fuzz:test-false 'odd (lambda () (oddp fuzz)))) ; test 2
                :count 100)
You can’t perform that action at this time.