Two days, two packages. I've cleaned up, updated, and packaged my Julia implementation of the QuickCheck specification-based randomized tester. If you're unfamiliar with QuickCheck, it's a unit test method which uses generated random inputs to try to indicate whether properties you state about your functions hold. For instance, a property of the zip() function is that it results in an iterator which is the length of the shorter of its input vectors:
julia> property((x::Vector{Int}, y::Vector{Int}) -> length(zip(x,y)) == min(length(x), length(y)))
OK, passed 100 tests.
If the specification is not met, the test case which violates the specification is printed:
julia> property((x::Vector{Int}, y::Vector{Int}) -> length(zip(x,y)) == max(length(x), length(y)))
ERROR: Falsifiable, after 1 tests:
{[2, 1], [2]}More information can be found in the documentation at
https://quickcheckjl.readthedocs.org/en/latest/The package is published to METADATA and can be downloaded via Pkg.
The source code is available at
https://github.com/pao/QuickCheck.jl.