Test::...Result(3pm)
π NAME π
okay bestie, so this is the manual for Test::...Result(3pm) β and the actual module it's about is Test::RandomResult, which is a little test helper that checks whether the results of some running code look random. that's it. that's the whole job. slay. β¨
πΈ VERSION πΈ
this doc is describing version 0.001 of Test::RandomResult (out of the Perl distribution Test-RandomResult), and it was released on 2019-07-17. yeah she's an old queen but she's our old queen. π
π¦ 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;
no cap, that's the whole vibe. you import the thing, you hand it a block of code, you tell it what to call the test. π
β¨ DESCRIPTION β¨
EARLY RELEASE. CURRENTLY HAS NOT CHECKED THE DISTRIBUTION OF RANDOM RESULTS.
π okay so listen β this is an early release and it has not checked the distribution of random results. like, at all. she's showing up to the function in a cute outfit and vibes alone. do not use this to certify anything cryptographically. please. for me.
π«Ά FUNCTIONS π«Ά
results_look_random
usage:
results_look_random { CODE... }, 'TEST NAME';
results_look_random { CODE... }, OPT1=>VAL, OPT2=>VAL, ..., 'TEST NAME';
so the way this works: it runs your code multiple times (by default 30 or more, check the "runs" option for that) and then checks whether the results look random. it's giving "i know it when i see it" energy, honestly.
the known options are:
runsβ an integer. default is 30 or more. this is how many times it's gonna run your CODE, bestie. πββοΈbetweenβ a 2-element array of numbers, written like[$min, $max]. it checks that the results land between$minand$max. πminβ a number. sets the minimum value, and it's inclusive.xminβ a number. sets the minimum value, and it's exclusive.maxβ a number. sets the maximum value, and it's inclusive.xmaxβ a number. sets the maximum value, and it's exclusive.
π tiny note so nobody comes for me:min/maxare inclusive,xmin/xmaxare exclusive. that's the only difference. thexis doing the heavy lifting. iconic honestly.
π HOMEPAGE π
go visit the project's homepage, she'd love the engagement: <https://metacpan.org/release/Test-RandomResult>
π SOURCE π
the source repository lives right here: <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>
and when you submit a bug or a request, please include a test-file β or a patch to an existing test-file β that illustrates the bug or the desired feature. like, show me the receipts, not just the feelings. π
β SEE ALSO β
Test::RandomResultsTest::Stochastic
π AUTHOR π
perlancar <perlancar@cpan.org>
πΈ COPYRIGHT AND LICENSE πΈ
this software is copyright (c) 2019 by perlancar@cpan.org.
it's free software β you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. periodt. π
and that's the whole page, bestie π«Ά this was Test::...Result(3pm) as generated by perl v5.34.0 on 2022-06-30. go write some tests that are lowkey random, and stay slay. πβ¨
π¦ where this page comes from
- debian bookworm: libtest-randomresult-perl 0.001-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libtest-randomresult-perl 0.001-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtest-randomresult-perl 0.001-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtest-randomresult-perl 0.001-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtest-randomresult-perl 0.001-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms