Outdated egg!

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.

If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.



cluckcheck is a Chicken Scheme port of the QuickCheck unit test framework.

cluckcheck is a different kind of unit test framework. Rather than using a bunch of manual assert-assert-assert statements, cluckcheck tests properties. For an overview of the QuickCheck methodology, see the homepage.


YelloSoft QuickCheck




Andrew Pennebaker (Homepage)


No egg requirements.


[procedure] (gen-int)

Generate a random integer.

> (use cluckcheck)
> (gen-int)
[procedure] (gen-bool)

Generate a random boolean.

> (gen-bool)
[procedure] (gen-char)

Generate a random character.

> (gen-char)
[procedure] (gen-list gen)

Generate a random list populated by gen.

> (gen-list gen-int)
(103 24 45 253 227 28 92 45 235 193 212 27 9 195 224 228 103 255)

gen-list can be combined with other generators, including custom generators, to create generators for complex data structures. See gen-string.

[procedure] (gen-string)

Generate a random string. gen-string is a wrapper around (gen-list gen-char).

> (gen-string)
"\x05&o@\by\x00J &\x00\v\x1691\x05\x19\x14z\r<VxU\x1b\x06~(wE\x05\x03LB&T\x1fLl-\x15\x06"
[procedure] (for-all property gen1 gen2 gen3...)

Tests a property function with values generated by the generator functions. If the property returns false, testing halts and the offending input values are printed to the screen.

> (for-all even? gen-int)
*** Failed!

Here, the test fails because an integer (57) is found, that is not even.

For more examples, see example.scm.



Version History

cluckcheck 0.0 - First release