1Test::RandomResult(3) User Contributed Perl DocumentationTest::RandomResult(3)
2
3
4

NAME

6       Test::RandomResult - Test that results of a running code look random
7

VERSION

9       This document describes version 0.001 of Test::RandomResult (from Perl
10       distribution Test-RandomResult), released on 2019-07-17.
11

SYNOPSIS

13        use Test::More;
14        use Test::RandomResult; # exports results_look_random
15
16        results_look_random { your_func($arg) } 'your_func returns random result';
17        results_look_random { your_func($arg) } between=>[1,10], 'your_func returns random between 1-10';
18        ...
19        done_testing;
20

DESCRIPTION

22       EARLY RELEASE. CURRENTLY HAS NOT CHECKED THE DISTRIBUTION OF RANDOM
23       RESULTS.
24

FUNCTIONS

26   results_look_random
27       Usage:
28
29        results_look_random { CODE... }, 'TEST NAME';
30        results_look_random { CODE... }, OPT1=>VAL, OPT2=>VAL, ..., 'TEST NAME';
31
32       Run code multiple times (by default 30 or more, see the "runs" option)
33       and check if the results look random.
34
35       Known options:
36
37       •   runs
38
39           Integer. Default 30 or more. Number of times to run CODE.
40
41       •   between
42
43           2-element array of numbers ("[$min, $max]"). Check that results are
44           between $min and $max.
45
46       •   min
47
48           Number. Specify minimum value (inclusive).
49
50       •   xmin
51
52           Number. Specify minimum value (exclusive).
53
54       •   max
55
56           Number. Specify maximum value (inclusive).
57
58       •   xmax
59
60           Number. Specify maximum value (exclusive).
61

HOMEPAGE

63       Please visit the project's homepage at
64       <https://metacpan.org/release/Test-RandomResult>.
65

SOURCE

67       Source repository is at
68       <https://github.com/perlancar/perl-Test-RandomResult>.
69

BUGS

71       Please report any bugs or feature requests on the bugtracker website
72       <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-RandomResult>
73
74       When submitting a bug or request, please include a test-file or a patch
75       to an existing test-file that illustrates the bug or desired feature.
76

SEE ALSO

78       Test::RandomResults
79
80       Test::Stochastic
81

AUTHOR

83       perlancar <perlancar@cpan.org>
84
86       This software is copyright (c) 2019 by perlancar@cpan.org.
87
88       This is free software; you can redistribute it and/or modify it under
89       the same terms as the Perl 5 programming language system itself.
90
91
92
93perl v5.36.0                      2023-01-20             Test::RandomResult(3)
Impressum