No description or website provided.
Perl6
Latest commit 0da38dc Jan 9, 2017 @FCO Changing README.md
Permalink
Failed to load latest commit information.
lib/Test Add pod Jan 9, 2017
resources
t Fix META Jan 7, 2017
.travis.yml Update .travis.yml Jan 7, 2017
META.info
README.md Changing README.md Jan 9, 2017
test.p6 fix lib Dec 17, 2016
test2.p6 Fix test2.p6 Dec 22, 2016

README.md

Test::Fuzz

Build Status

https://perl6advent.wordpress.com/2016/12/22/day-22-generative-testing/

Synopsis

use lib ".";
use Test::Fuzz;

sub bla (Int $bla, Int $ble --> UInt) is fuzzed {
    $bla + $ble
}

sub ble (Int $ble) is fuzzed {
    die "it is prime!" if $ble.is-prime
}

sub bli (Str :$bli) is fuzzed {
    die "it's too long" unless $bli.chars < 10
}

sub blo ("test") is fuzzed {
    "ok"
}

multi MAIN(Bool :$fuzz!) {
    run-tests
}

Description

Test::Fuzz is a tool to generative/fuzz testing. Add the is fuzzed trait and Test::Fuzz will try to figure out the best generators to use to test your function.

To run the tests, just call the run-tests function.

INSTALLATION

    # with panda
    > panda install Test::Fuzz

    # or, with zef
    > zef install Test::Fuzz