@title QuickCheck Mini @version {@version} @copyright Quviq AB, 2006-2010. @doc QuickCheck is a specification-based testing tool for Erlang. QuickCheck Mini is a powerful, but restricted version of QuickCheck. It is released free of charge for anyone interested in learning more about QuickCheck as well as for open source developers that want to ship their code with simple QuickCheck properties. In order to learn more about QuickCheck, please visit http://www.quviq.com/. There is also a mailing list discussing QuickCheck issues, which you can subscribe to by sending an email to quickcheck-questions@quviq.com with subject "Subscribe".

QuickCheck

Programs are tested by writing properties in the source code, such as
prop_reverse() ->
  ?FORALL(Xs,list(int()),
    lists:reverse(lists:reverse(Xs)) == Xs).
Properties are tested by calling
eqc:quickcheck(prop_reverse())
which generates 100 random test cases and checks that the property returns true in every case.

Functions for writing properties are found in module {@link eqc}, while functions for writing test data generators (such as list(int()) above) are found in module {@link eqc_gen}. Parts of the interface are provided via macros, which are defined in eqc.hrl--this file should be included in every module which uses QuickCheck. This header file also imports much of the QuickCheck API, so it can be used without explicit module names.