The cl-fuzz Reference Manual

This is the cl-fuzz Reference Manual, version 0.0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Mon Feb 26 15:13:41 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-fuzz

A Fuzz Testing Framework

Author

Neil T. Dantam

License

BSD-2

Version

0.0.1

Dependency

alexandria (system).

Source

cl-fuzz.asd.

Child Component

fuzz.lisp (file).


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-fuzz/cl-fuzz.asd

Source

cl-fuzz.asd.

Parent Component

cl-fuzz (system).

ASDF Systems

cl-fuzz.


3.1.2 cl-fuzz/fuzz.lisp

Source

cl-fuzz.asd.

Parent Component

cl-fuzz (system).

Packages

cl-fuzz.

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-fuzz

Source

fuzz.lisp.

Nickname

fuzz

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: do-test ((name &key test) expected-expression test-expression)

Compares the result of ‘EXPECTED-EXPRESSION’ and ‘TEST-EXPRESSION’ using ‘TEST’.

NAME: A name for this test.
TEST: (lambda (expected-value actual-value)) => (or t nil).

Package

cl-fuzz.

Source

fuzz.lisp.


5.1.2 Ordinary functions

Function: run-tests (generator tester &key formatter log count)

Perform a series of fuzz tests.
GENERATOR: (lambda ()) => fuzz.
TESTER: (lambda (fuzz)) => nil, performs one set of fuzz tests.

Package

cl-fuzz.

Source

fuzz.lisp.

Function: test-eq (name expected-function test-function)

Call EXPECTED-FUNCTION and TEST-FUNCTION and test if results are #’EQ.

Package

cl-fuzz.

Source

fuzz.lisp.

Function: test-eql (name expected-function test-function)

Call EXPECTED-FUNCTION and TEST-FUNCTION and test if results are #’EQL.

Package

cl-fuzz.

Source

fuzz.lisp.

Function: test-equal (name expected-function test-function)

Call EXPECTED-FUNCTION and TEST-FUNCTION and test if results are #’EQUAL.

Package

cl-fuzz.

Source

fuzz.lisp.

Function: test-equalp (name expected-function test-function)

Call EXPECTED-FUNCTION and TEST-FUNCTION and test if results are #’EQUALP.

Package

cl-fuzz.

Source

fuzz.lisp.

Function: test-false (name test-function)

Call TEST-FUNCTION and test if result is false.

Package

cl-fuzz.

Source

fuzz.lisp.

Function: test-predicate (name predicate &rest result-functions)

Test if PREDICATE applied to the results other arguments is T.

PREDICATE: (or (lambda (a b)) (lambda (a)))
RESULT-FUNCTIONS: (lambda ()) – returns the arguments for predicate

Package

cl-fuzz.

Source

fuzz.lisp.

Function: test-true (name test-function)

Call TEST-FUNCTION with no arguments. If result is true, mark successful test. If result is false, print an error message. NAME: name of this test
TEST-FUNCTION: (lambda ()) => (or nil RESULT)
RESULT: the result of TEST-FUNCTION

Package

cl-fuzz.

Source

fuzz.lisp.

Function: test= (name expected-function test-function)

Call EXPECTED-FUNCTION and TEST-FUNCTION and test if results are #’=.

Package

cl-fuzz.

Source

fuzz.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *fuzz-counts*
Package

cl-fuzz.

Source

fuzz.lisp.

Special Variable: *fuzz-input*
Package

cl-fuzz.

Source

fuzz.lisp.

Special Variable: *fuzz-log*
Package

cl-fuzz.

Source

fuzz.lisp.

Special Variable: *fuzz-random*
Package

cl-fuzz.

Source

fuzz.lisp.

Special Variable: *fuzz-trail*
Package

cl-fuzz.

Source

fuzz.lisp.

Special Variable: *fuzz-var*
Package

cl-fuzz.

Source

fuzz.lisp.


5.2.2 Macros

Macro: do-operations ((var-lambda-list &optional initial) fuzz &body cases)

Perform a series of operations on the fuzz.

Each case should return the value after processing the current operation, or NIL if the test failed. INITIAL and the true result of each of CASES will be DESTRUCTURING-BIND’ed to VAR-LAMBDA-LIST.

FUZZ: (list (list &rest operation))
CASES: ((destructuring-case-lambda-list) &body body) => result

Package

cl-fuzz.

Source

fuzz.lisp.


Appendix A Indexes


A.1 Concepts