PropCheck - Property Testing v0.0.2 PropCheck.Properties

This module defined the property/4 macro. It is automatically available by using PropCheck.

Summary

Macros

Defines a property as part of ExUnit test

Macros

property(name, opts \\ [:quiet], var \\ quote() do _ end, list)

Defines a property as part of ExUnit test.

The property macro takes at minimum a name and a do-block containing the code of the property to be tested. The property code is encapsulated as ean ExUnit test case of category property, which is released as part of Elixir 1.3 and allows a nice mix of regular unit test and property based testing. This is the reason for the third parameter taking an environment of variables defined in a test setup function.

The second parameter sets options for Proper (see PropCheck. The default is :quit such that execution during ExUnit runs are silent, as normal unit tests are. You can change it e.g. to :verbose or setting the maximum size of the test data generated or what ever may be helpful. For seeing the result of wrapper functions PropCheck.aggregate/2 etc, the verbose mode is required.