File: README

package info (click to toggle)
libtest-randomresult-perl 0.001-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 148 kB
  • sloc: perl: 103; makefile: 2
file content (86 lines) | stat: -rw-r--r-- 2,239 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
NAME
    Test::RandomResult - Test that results of a running code look random

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

SYNOPSIS
     use Test::More;
     use Test::RandomResult; # exports results_look_random

     results_look_random { your_func($arg) } 'your_func returns random result';
     results_look_random { your_func($arg) } between=>[1,10], 'your_func returns random between 1-10';
     ...
     done_testing;

DESCRIPTION
    EARLY RELEASE. CURRENTLY HAS NOT CHECKED THE DISTRIBUTION OF RANDOM
    RESULTS.

FUNCTIONS
  results_look_random
    Usage:

     results_look_random { CODE... }, 'TEST NAME';
     results_look_random { CODE... }, OPT1=>VAL, OPT2=>VAL, ..., 'TEST NAME';

    Run code multiple times (by default 30 or more, see the "runs" option)
    and check if the results look random.

    Known options:

    *   runs

        Integer. Default 30 or more. Number of times to run CODE.

    *   between

        2-element array of numbers ("[$min, $max]"). Check that results are
        between $min and $max.

    *   min

        Number. Specify minimum value (inclusive).

    *   xmin

        Number. Specify minimum value (exclusive).

    *   max

        Number. Specify maximum value (inclusive).

    *   xmax

        Number. Specify maximum value (exclusive).

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

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

BUGS
    Please report any bugs or feature requests on the bugtracker website
    <https://rt.cpan.org/Public/Dist/Display.html?Name=Test-RandomResult>

    When submitting a bug or request, please include a test-file or a patch
    to an existing test-file that illustrates the bug or desired feature.

SEE ALSO
    Test::RandomResults

    Test::Stochastic

AUTHOR
    perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE
    This software is copyright (c) 2019 by perlancar@cpan.org.

    This is free software; you can redistribute it and/or modify it under
    the same terms as the Perl 5 programming language system itself.