No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/Test Fail test if we can not generate samples Dec 16, 2017
resources WiP Dec 10, 2016
t Make the 'misc-class' test more modular. Dec 15, 2017
.gitignore Added a '.gitignore' Aug 15, 2017
.travis.yml add .travis.yml Feb 22, 2017
META6.json Bump version Aug 15, 2017
README.md Include it in README Dec 11, 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"
}

sub blu (Str $blu) {
	"ok";
}

fuzz &blu;

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

Description

Test::Fuzz is a tool for 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. If the function was already made, pass it to the fuzz function for the same effect.

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

INSTALLATION

    # with zef
    > zef install Test::Fuzz

    # or, with 6pm (https://github.com/FCO/6pm)
    > $ 6pm install Test::Fuzz