p5-Test-MockRandom-1.01_1.txz


Advertisement

Description

p5-Test-MockRandom - Replaces random number generation with non-random number generation

Property Value
Distribution FreeBSD 12
Repository FreeBSD Ports Latest amd64
Package filename p5-Test-MockRandom-1.01_1.txz
Package name p5-Test-MockRandom
Package version 1.01
Package release 1
Package architecture amd64
Package type txz
Category devel perl5
Homepage https://metacpan.org/release/Test-MockRandom
License APACHE20
Maintainer perl@FreeBSD.org
Download size 15.42 KB
Installed size 34.79 KB
This perhaps ridiculous-seeming module was created to test routines that
manipulate random numbers by providing a known output from rand. Given a list of
seeds with srand, it will return each in turn. After seeded random numbers are
exhausted, it will always return 0. Seed numbers must be of a form that meets
the expected output from rand as called with no arguments -- i.e. they must be
between 0 (inclusive) and 1 (exclusive). In order to facilitate generating and
testing a nearly-one number, this module exports the function oneish, which
returns a number just fractionally less than one.
Depending on how this module is called with use, it will export rand to a
specified package (e.g. a class being tested) effectively overriding and
intercepting calls in that package to the built-in rand. It can also override
rand in the current package or even globally. In all of these cases, it also
exports srand and oneish to the current package in order to control the output
of rand.
Alternatively, this module can be used to generate objects, with each object
maintaining its own distinct seed array.
WWW: https://metacpan.org/release/Test-MockRandom

Alternatives

Package Version Architecture Repository
p5-Test-MockRandom-1.01_1.txz 1.01 i386 FreeBSD Ports Latest
p5-Test-MockRandom-1.01_1.txz 1.01 amd64 FreeBSD Ports Quarterly
p5-Test-MockRandom-1.01_1.txz 1.01 i386 FreeBSD Ports Quarterly
p5-Test-MockRandom - - -

Requires

Name Value
perl5 = 5.28.1_1

Download

Type URL
Mirror pkg.freebsd.org
Binary Package p5-Test-MockRandom-1.01_1.txz
Source Package devel/p5-Test-MockRandom

Install Howto

Install p5-Test-MockRandom txz package:

# pkg install p5-Test-MockRandom

See Also

Package Description
p5-Test-MockTime-0.17.txz Replaces actual time with simulated time
p5-Test-Modern-0.013.txz Precision testing for modern perl
p5-Test-Module-Used-0.2.3_3.txz Test required module is really used and vice versa
p5-Test-Moose-More-0.050.txz More tools for testing Moose packages
p5-Test-More-UTF8-0.04_1.txz Enhancing Test::More for UTF-8-based projects
p5-Test-Most-0.35.txz Perl extension for most commonly needed test functions and features
p5-Test-Name-FromLine-0.13_1.txz Perl extension to fill test names from caller line
p5-Test-Needs-0.002006.txz Skip tests when modules not available
p5-Test-Net-LDAP-0.07.txz Perl extension of Net::LDAP subclass for testing
p5-Test-Net-RabbitMQ-0.13.txz Perl mock RabbitMQ implementation for use when testing
p5-Test-Nginx-0.26.txz Testing modules for Nginx C module development
p5-Test-NoTabs-1.4.txz Check the presence of tabs in your project
p5-Test-NoWarnings-1.04_2.txz Hide and store warnings while running test scripts
p5-Test-Number-Delta-1.06_1.txz Compare the difference between two numbers within a specified amount
p5-Test-Object-0.08.txz Thoroughly testing objects via registered handlers
Advertisement
Advertisement