| 1 |
NAME |
| 2 |
Test::RandomResult - Test that results of a running code look random |
| 3 |
|
| 4 |
VERSION |
| 5 |
This document describes version 0.001 of Test::RandomResult (from Perl |
| 6 |
distribution Test-RandomResult), released on 2019-07-17. |
| 7 |
|
| 8 |
SYNOPSIS |
| 9 |
use Test::More; |
| 10 |
use Test::RandomResult; # exports results_look_random |
| 11 |
|
| 12 |
results_look_random { your_func($arg) } 'your_func returns random result'; |
| 13 |
results_look_random { your_func($arg) } between=>[1,10], 'your_func returns random between 1-10'; |
| 14 |
... |
| 15 |
done_testing; |
| 16 |
|
| 17 |
DESCRIPTION |
| 18 |
EARLY RELEASE. CURRENTLY HAS NOT CHECKED THE DISTRIBUTION OF RANDOM |
| 19 |
RESULTS. |
| 20 |
|
| 21 |
FUNCTIONS |
| 22 |
results_look_random |
| 23 |
Usage: |
| 24 |
|
| 25 |
results_look_random { CODE... }, 'TEST NAME'; |
| 26 |
results_look_random { CODE... }, OPT1=>VAL, OPT2=>VAL, ..., 'TEST NAME'; |
| 27 |
|
| 28 |
Run code multiple times (by default 30 or more, see the "runs" option) |
| 29 |
and check if the results look random. |
| 30 |
|
| 31 |
Known options: |
| 32 |
|
| 33 |
* runs |
| 34 |
|
| 35 |
Integer. Default 30 or more. Number of times to run CODE. |
| 36 |
|
| 37 |
* between |
| 38 |
|
| 39 |
2-element array of numbers ("[$min, $max]"). Check that results are |
| 40 |
between $min and $max. |
| 41 |
|
| 42 |
* min |
| 43 |
|
| 44 |
Number. Specify minimum value (inclusive). |
| 45 |
|
| 46 |
* xmin |
| 47 |
|
| 48 |
Number. Specify minimum value (exclusive). |
| 49 |
|
| 50 |
* max |
| 51 |
|
| 52 |
Number. Specify maximum value (inclusive). |
| 53 |
|
| 54 |
* xmax |
| 55 |
|
| 56 |
Number. Specify maximum value (exclusive). |
| 57 |
|
| 58 |
HOMEPAGE |
| 59 |
Please visit the project's homepage at |
| 60 |
<https://metacpan.org/release/Test-RandomResult>. |
| 61 |
|
| 62 |
SOURCE |
| 63 |
Source repository is at |
| 64 |
<https://github.com/perlancar/perl-Test-RandomResult>. |
| 65 |
|
| 66 |
BUGS |
| 67 |
Please report any bugs or feature requests on the bugtracker website |
| 68 |
<https://rt.cpan.org/Public/Dist/Display.html?Name=Test-RandomResult> |
| 69 |
|
| 70 |
When submitting a bug or request, please include a test-file or a patch |
| 71 |
to an existing test-file that illustrates the bug or desired feature. |
| 72 |
|
| 73 |
SEE ALSO |
| 74 |
Test::RandomResults |
| 75 |
|
| 76 |
Test::Stochastic |
| 77 |
|
| 78 |
AUTHOR |
| 79 |
perlancar <[email protected]> |
| 80 |
|
| 81 |
COPYRIGHT AND LICENSE |
| 82 |
This software is copyright (c) 2019 by [email protected]. |
| 83 |
|
| 84 |
This is free software; you can redistribute it and/or modify it under |
| 85 |
the same terms as the Perl 5 programming language system itself. |
| 86 |
|