Add p5-Test-MockRandom 0.99, replaces random number generation with
non-random number generation. PR: 100749 Submitted by: Jin-Shan Tseng <tjs at cdpa.nsysu.edu.tw>
This commit is contained in:
parent
225db5a61b
commit
81f9983ba4
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=168751
@ -1348,6 +1348,7 @@
|
||||
SUBDIR += p5-Test-Manifest
|
||||
SUBDIR += p5-Test-MockModule
|
||||
SUBDIR += p5-Test-MockObject
|
||||
SUBDIR += p5-Test-MockRandom
|
||||
SUBDIR += p5-Test-NoWarnings
|
||||
SUBDIR += p5-Test-Number-Delta
|
||||
SUBDIR += p5-Test-Output
|
||||
|
22
devel/p5-Test-MockRandom/Makefile
Normal file
22
devel/p5-Test-MockRandom/Makefile
Normal file
@ -0,0 +1,22 @@
|
||||
# New Ports Collection Makefile for: p5-Test-MockRandom
|
||||
# Date created: 2006-07-23
|
||||
# Whom: Jin-Shan Tseng <tjs@cdpa.nsysu.edu.tw>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= Test-MockRandom
|
||||
PORTVERSION= 0.99
|
||||
CATEGORIES= devel perl5
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
|
||||
MASTER_SITE_SUBDIR= Test
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
||||
MAINTAINER= tjs@cdpa.nsysu.edu.tw
|
||||
COMMENT= Replaces random number generation with non-random number generation
|
||||
|
||||
BUILD_DEPENDS= ${SITE_PERL}/Module/Build.pm:${PORTSDIR}/devel/p5-Module-Build
|
||||
|
||||
PERL_CONFIGURE= yes
|
||||
|
||||
MAN3= Test::MockRandom.3
|
||||
|
||||
.include <bsd.port.mk>
|
3
devel/p5-Test-MockRandom/distinfo
Normal file
3
devel/p5-Test-MockRandom/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
MD5 (Test-MockRandom-0.99.tar.gz) = 8852d9674c670d8309064c98f7b3e2a5
|
||||
SHA256 (Test-MockRandom-0.99.tar.gz) = 0978a6ddea5cfa76f22b1c1732020d7f8d4b5cf06246085442f9c96568dc226e
|
||||
SIZE (Test-MockRandom-0.99.tar.gz) = 17649
|
20
devel/p5-Test-MockRandom/pkg-descr
Normal file
20
devel/p5-Test-MockRandom/pkg-descr
Normal file
@ -0,0 +1,20 @@
|
||||
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: http://search.cpan.org/dist/Test-MockRandom/
|
5
devel/p5-Test-MockRandom/pkg-plist
Normal file
5
devel/p5-Test-MockRandom/pkg-plist
Normal file
@ -0,0 +1,5 @@
|
||||
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/MockRandom/.packlist
|
||||
%%SITE_PERL%%/Test/MockRandom.pm
|
||||
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/MockRandom
|
||||
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test
|
||||
@dirrmtry %%SITE_PERL%%/Test
|
Loading…
Reference in New Issue
Block a user