File: mock-rand.t

package info (click to toggle)
libtest-mockrandom-perl 1.01-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 256 kB
  • sloc: perl: 326; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 265 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package main;
use strict;
use warnings;
use lib 'lib';

use Test::More tests => 2;
use Test::MockRandom 'Test::Package';

srand( 0.23, 0.32 );

is( Test::Package::foo(), 0.23 );
is( Test::Package::foo(), 0.32 );

package Test::Package;

sub foo { return rand() };